1
$\begingroup$

I need to find a solution for a system of differential equations involving functions $x(t),y(t),z(t)$ with variable $t$. Computing

DSolve[{x''[
t] == (2 y[t] x'[t] y'[t] + 
  x[t] (x'[t]^2 - y'[t]^2 - z'[t]^2))/(x[t]^2 + y[t]^2), 
y''[t] == (2 x[t] x'[t] y'[t] - 
  y[t] (x'[t]^2 - y'[t]^2 + z'[t]^2))/(x[t]^2 + y[t]^2), 
z''[t] == 2 ((x[t] x'[t] + y[t] y'[t]) z'[t])/(x[t]^2 + y[t]^2), 
x'[0] == 1, y'[0] == 1, z'[0] == 1, x[0] == 0, y[0] == 0, 
z[0] == 0}, {x[t], y[t], z[t]}, t]

Mathematica will just repeat my command as output.

Do you have any ideas why Mathematica won't compute? Also, how should I modify my code to get some response?

Thank you!

$\endgroup$
  • 2
    $\begingroup$ Your system is highly non linear. Ibet there is no closeform solution you must try NDSolve and begin with another set of initial conditions since whith x[0]== 0 and y[0]== 0 you encounter a singularity (division by 0) $\endgroup$ – cyrille.piatecki Dec 19 '16 at 14:59
  • $\begingroup$ NDSolve says: x[t]=0,y[t]=0,z[t]=0,maybe your equations are incorrect? $\endgroup$ – Mariusz Iwaniuk Dec 19 '16 at 16:34
  • $\begingroup$ The observation by @MariuszIwaniuk is correct, but setting the starting values to 1 does not help DSolve find an answer. $\endgroup$ – bbgodfrey Dec 19 '16 at 16:43
7
$\begingroup$

Edit: Derivation of symbolic solution

As commented by Mariusz Iwaniuk), the initial conditions in the question are inconsistent. Setting {x[0] == 1, y[0] == 1, z[0] == 1} eliminates the inconsistency but does not cause DSolve to return a solution. So, to understand the desired solution, first solve the equations numerically.

s = NDSolveValue[
   {x''[t] == (2 y[t] x'[t] y'[t] + x[t] (x'[t]^2 - y'[t]^2 - z'[t]^2))/(x[t]^2 + y[t]^2), 
    y''[t] == (2 x[t] x'[t] y'[t] - y[t] (x'[t]^2 - y'[t]^2 + z'[t]^2))/(x[t]^2 + y[t]^2), 
    z''[t] == 2 ((x[t] x'[t] + y[t] y'[t]) z'[t])/(x[t]^2 + y[t]^2), 
    x'[0] == 1, y'[0] == 1, z'[0] == 1, x[0] == 1, y[0] == 1, z[0] == 1}, 
   {x, y, z}, {t, -5, 8}];
Plot[Evaluate@Through[s[t]], {t, -5, 8}]

enter image description here

The green curve represents z, and the brown curve represents both x and y, which are identical. Moreover, x and y are identical whenever their initial conditions are identical. This fact allows the equations to be solved symbolically.

Eliminate z (yesterdays result)

The third ODE can be rewritten as

D[z[t], {t, 2}]/D[z[t], t] == D[x[t]^2 + y[t]^2, t]/(x[t]^2 + y[t]^2)

which has as a solution

z'[t] == c (x[t]^2 + y[t]^2)

where c is a constant, which be determined by evaluating the solution at t == 0. For the initial conditions chosen here, c -> 1/2. The first two ODEs can be simplified by means of this first integral.

eq2 ==
{x''[t] == (2 y[t] x'[t] y'[t] + x[t] (x'[t]^2 - y'[t]^2 - z'[t]^2))/(x[t]^2 + y[t]^2), 
 y''[t] == (2 x[t] x'[t] y'[t] - y[t] (x'[t]^2 - y'[t]^2 + z'[t]^2))/(x[t]^2 + y[t]^2)}
      /. z'[t] -> c (x[t]^2 + y[t]^2)
(* {x''[t] == (2 y[t] x'[t] y'[t] + x[t] (x'[t]^2 - y'[t]^2 - c^2 (x[t]^2 + y[t]^2)^2))/
        (x[t]^2 + y[t]^2), 
    y''[t] == (2 x[t] x'[t] y'[t] - y[t] (x'[t]^2 - y'[t]^2 + c^2 (x[t]^2 + y[t]^2)^2))/
        (x[t]^2 + y[t]^2)} *)

The ODE system to be solved has been reduced from sixth to fourth order. Nonetheless, DSolve returns unevaluated from

DSolve[eq2, {x, y}, t]

Obtain solution for x and y, then z

As just noted, insight from the numerical solution suggests the substitution

eq1 = (eq2 /. x -> y) // Simplify//First
(* 2 c^2 y[t]^3 + y''[t] == y'[t]^2/y[t] *)

for which DSolve finally returns an answer.

sol = Simplify[First[y[t] /. 
    DSolve[{eq1}, y[t], t, Assumptions -> y > 0]] /. {C[1] -> c1^2, C[2] -> c2}, c1 > 0]
(* (2 c1^2 E^(c1 (c2 + t)))/(2 c^2 c1^2 + E^(2 c1 (c2 + t))) *)

(The assumption, y > 0, (clearly true from the numerical solution) is essential to obtaining a tractable result.) Next, boundary conditions are imposed.

{sol, D[sol, t]} /. t -> 0;
con = Last[Solve[(% /. c -> 1/2) == 1, {c1, c2}] /. C[1] -> 0]
(* {c1 -> Sqrt[3/2], c2 -> Sqrt[2/3] (-Log[2] + Log[3 - Sqrt[6]])} *)

FullSimplify[sol /. c -> 1/2 /. con]
(* -((6 (-3 + Sqrt[6]) E^(Sqrt[3/2] t))/(3 + (-3 + Sqrt[6])^2 E^(Sqrt[6] t))) *)

which is the desired solution for x and y. z now can be obtained from

DSolveValue[{z'[t] == %, z'[0] == 1, z[0] == 1}, z[t], t] // FullSimplify
(* (-5 - 2 Sqrt[6]) (-5 + 2 Sqrt[6] + 4 (-Sqrt[2] + Sqrt[3]) ArcTan[Sqrt[2] - Sqrt[3]] + 
   2 Sqrt[6 (5 - 2 Sqrt[6])] ArcTan[Sqrt[5 - 2 Sqrt[6]]] + (-10 Sqrt[2] + 
   8 Sqrt[3]) ArcTan[(-Sqrt[2] + Sqrt[3]) E^(Sqrt[3/2] t)]) *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.