these are the final diff. equations:
eq = [diff(x1(t), t) == x2, diff(x2(t), t) == - p2 - x2, diff(p1(t), t) == 0, diff(p2(t), t) == p2 - p1]
the solution of dsolve is:
sol_h =
struct with fields:
x2: C2 - t*(p2 + x2)
x1: C1 + t*x2
p1: C3
p2: C4 - t*(p1 - p2)
But the answer should be like:
x2: (C3*exp(t))/2 - C4 + (C2*exp(-t))/2
x1: (C3*exp(t))/2 - C4*t - C1 - (C2*exp(-t))/2
p1: C4
p2: C4 - C3*exp(t)
I got the first solution by dsolve(eq) in my script, the second solution i got by dsolve(diff(x1(t), t) == x2, diff(x2(t), t) == - p2 - x2, diff(p1(t), t) == 0, diff(p2(t), t) == p2 - p1) in the workspace
Where is the ptoblem?