derivative of ODE

Messages in english

Modérateur : xcasadmin

XcasEngGuy
Messages : 146
Inscription : mer. janv. 13, 2010 3:20 pm

derivative of ODE

Message par XcasEngGuy » mer. sept. 21, 2016 2:41 pm

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)

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: derivative of ODE

Message par parisse » mer. sept. 21, 2016 6:47 pm

You should be able to do that by replacing x by a function x(t)

XcasEngGuy
Messages : 146
Inscription : mer. janv. 13, 2010 3:20 pm

Re: derivative of ODE

Message par XcasEngGuy » jeu. sept. 22, 2016 6:40 pm

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

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: derivative of ODE

Message par parisse » jeu. sept. 22, 2016 7:13 pm

Yes.

XcasEngGuy
Messages : 146
Inscription : mer. janv. 13, 2010 3:20 pm

Re: derivative of ODE

Message par XcasEngGuy » jeu. mars 09, 2017 4:44 pm

Thanks. Once I got used to it, it works very well.

Répondre