Initial conditions with a non-linear ODE in Mathematica

Posted by buggy on Stack Overflow See other posts from Stack Overflow or by buggy
Published on 2010-06-17T13:24:47Z Indexed on 2010/06/17 15:33 UTC
Read the original article Hit count: 248

Filed under:
|

Hi, I'm trying to use Mathematica's NDSolve[] to compute a geodesic along a sphere using the coupled ODE:

x" - (x" . x) x = 0

The problem is that I can only enter initial conditions for x(0) and x'(0) and the solver is happy with the solution where x" = 0. The problem is that my geodesic on the sphere has the initial condition that x"(0) = -x(0), which I have no idea how to tell mathematica. If I add this as a condition, it says I'm adding True to the list of conditions.

Here is my code:

s1 = NDSolve[{x1''[t] - (x1[t] * x1''[t] + x2[t] * x2''[t] + x3[t]*x3''[t]) * x1[t] == 0, x2''[t] -  (x1[t] * x1''[t] + x2[t] * x2''[t] + x3[t]*x3''[t]) * x2[t] == 0, x3''[t] - (x1[t] * x1''[t] + x2[t] * x2''[t] + x3[t]*x3''[t]) * x3[t] == 0, x1[0] == 1, x2[0] == 0, x3[0] == 0, x1'[0] == 0, x2'[0] == 0, x3'[0] == 1} , { x1, x2, x3}, {t, -1, 1}][[1]]

I would like to modify this so that the initial acceleration is not zero but -x(0).

Thanks

© Stack Overflow or respective owner

Related posts about mathematica

Related posts about ode