Home > Mobile >  Why is my function plotting incorrectly when using sympy.plotting.plot?
Why is my function plotting incorrectly when using sympy.plotting.plot?

Time:10-15

I am using sympy.plotting.plot to plot my function but, it shows me a different graph then when I plot the same function in my graphic calculator.

My code is:

def S(t):
    return (10*sympy.E**(t/12)*((sympy.sin((sympy.pi*t)/24))**2))
sympy.plotting.plot(S(t), xlim=[0,24])

Also, when I just do this,

sympy.plotting.plot(10*sympy.E**(t/12)*((sympy.sin((sympy.pi*t)/24))**2), xlim=[0,24])

it shows a different graph. In my calculator the function has a maximum at approximately t=14 while in python, the graph stops at t=10.

CodePudding user response:

enter image description here

  • Related