Page 1 sur 1

derivative of ODE

Publié : mer. sept. 21, 2016 2:41 pm
par XcasEngGuy
Is there a way to differentiate or integrate ODEs?

For example:

d/dt(1/2*m*(d2/d2t(x))^2+1/2*k*x^2)

where d2/d2t(x) is the second derivative of x w/respect to t and d/dt represents taking the derivative (which I would like to do in xcas)

I hope this is clear.

I should get:

m*d/dt(x)*d2/d2t(x)+k*x*d/dt(x)

Re: derivative of ODE

Publié : mer. sept. 21, 2016 6:47 pm
par parisse
You should be able to do that by replacing x by a function x(t)

Re: derivative of ODE

Publié : jeu. sept. 22, 2016 6:40 pm
par XcasEngGuy
I don't quite understand. I tried using diff on eq1:=5*x(t) and got 5*diff(x(t),t) and using diff again got 5*diff(x(t),t,2). Is that what you meant?

Thanks
Matt

Re: derivative of ODE

Publié : jeu. sept. 22, 2016 7:13 pm
par parisse
Yes.

Re: derivative of ODE

Publié : jeu. mars 09, 2017 4:44 pm
par XcasEngGuy
Thanks. Once I got used to it, it works very well.