# Revision history [back]

### ICS with diff

Hello, I'm trying to solve a very easy ODE, with ics including diff :

m,t,g= var('m t g')

z = function('z')(t)

DE = diff(z, t,2)+m*g

sol=desolve(DE,[z,t])

z0,v0=var('z0 v0')

sol_ics=desolve(DE,[z,t],ics=[0,z0,diff(sol,t)(t=0),v0])

-1/2gmt^2 + 1/2(_K2^2gm + 2v0 - 2z0)*t/_K2 + z0

It does not seem to work well.. What am I missing ?

Thanks!

 2 None slelievre 17654 ●22 ●160 ●348 http://carva.org/samue...

### ICS with diff

Hello, I'm trying to solve a very easy ODE, with ics including diff :diff:

m,t,g=

sage: m, t, g = var('m t g') g')
sage: z = function('z')(t) function('z')(t)
sage: DE = diff(z, t,2)+m*g sol=desolve(DE,[z,t]) z0,v0=var('z0 v0') sol_ics=desolve(DE,[z,t],ics=[0,z0,diff(sol,t)(t=0),v0]) 
 -1/2gmt^2 t,2)+m*g sage: sol = desolve(DE,[z,t]) sage: z0, v0 = var('z0 v0') sage: sol_ics = desolve(DE, [z, t], ics=[0, z0, diff(sol, t)(t=0), v0]) sage: sol_ics -1/2*g*m*t^2 + 1/2(_K2^2gm 1/2*(_K2^2*g*m + 2v0 2*v0 - 2z0)*t/_K2 2*z0)*t/_K2 + z0
z0 

It does not seem to work well.. well... What am I missing ?

Thanks!missing?