Ask Your Question

Wayne's profile - activity

2019-06-05 06:32:00 -0500 received badge  Popular Question (source)
2018-01-15 15:44:03 -0500 commented answer Finding extrema and zeros in lists

Both of your solutions are very helpful! Thanks much!

2018-01-15 15:41:22 -0500 commented answer Finding extrema and zeros in lists

Thanks very much!!

2018-01-11 12:08:33 -0500 received badge  Editor (source)
2018-01-11 12:07:44 -0500 answered a question Finding extrema and zeros in lists

OK, I think I have a path to a solution. I have changed the differential equation so that it has zeros and this code prints the values on either side of where the function crosses zero. I can do something similar for the extrema. So I guess I am now asking if there is a function call that does this, or if there is a smarter way. Thanks, Wayne

var('t y z')

P=desolve_system_rk4([z,-z^2*(-2+t/(1+t))-y],[y,z],ics=[0.1,10,2],ivar=t,end_points=100)

Q=[ [t1,y1] for t1,y1,z1 in P]

line(Q).show()

print len(Q)

[a1,b1]=Q[0]

for i in range(1,len(Q)):

    [a2,b2]=Q[i]

    if(((b1<0.)and(b2>0.)) or ((b1>0.)and(b2<0.))):

        print a1,b1,a2,b2

    a1=a2

    b1=b2
2018-01-11 06:27:25 -0500 asked a question Finding extrema and zeros in lists

I create a list Q (below) of pairs of numbers [t1,z1], I want the pairs (maybe just a print of them?) at the local extrema (of z1) and where z1 crosses zero. Is there a simple way to do this?

var('t y z')
P=desolve_system_rk4([z,0.005*exp(-y/8000)*z^2-10],[y,z],ics=[0,32000,0],ivar=t,end_points=400)
Q=[ [t1,z1] for t1,y1,z1 in P]

Thanks, Wayne

2018-01-10 22:25:20 -0500 received badge  Scholar (source)
2017-12-30 21:13:14 -0500 commented answer solving nonlinear second order ordinary differential equations numerically

Thanks very much Calc314! Clearly I have a lot to learn. I will work on this.

2017-12-29 23:11:00 -0500 received badge  Student (source)
2017-12-29 18:10:40 -0500 answered a question solving nonlinear second order ordinary differential equations numerically

Thanks Eric,

I meant the g(t) term to be a y(t) term so the equation looks like

y''(t)+f(t)(y'(t))^2 +y(t)=0

I don't think this is easily turned into a first order equation.

Wayne

2017-12-29 13:34:21 -0500 answered a question numerical solutions to second order nonlinear differential equations

Oops, I should have had a y(t) term in there, e.g. y''(t)+f(t)(y'(t))^2+y(t)=0

2017-12-29 11:12:21 -0500 asked a question numerical solutions to second order nonlinear differential equations

Are there any Sage tools that will numerically solve equations of, for example, this form:

y''(t)+f(t)(y'(t))^2+g(t)=0

(where the derivatives are with respect to t)?

Thanks, Wayne

2017-12-29 11:12:21 -0500 asked a question solving nonlinear second order ordinary differential equations numerically

Are there any Sage tools that will numerically solve equations of, for example, this form:

y''(t)+f(t)(y'(t))^2+g(t)=0

(where the derivatives are with respect to t)?

Thanks, Wayne