Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use Mathematica to solve 2 coupled differential equations.

My equations are of the form \begin{equation}\ddot{x}_i + A_{il} \partial^l A^{jk} ( \dot{x}_b \dot{x}_c - y_b y_c ) =0 \end{equation}

where $x_a=x_a(t)$ are functions of $t$ and $y_a$ are constant vectors (I'm happy to set these to zero to begin with if it will help get a solution!)

For the problem at hand, $a=1,2$ and so I have two coupled PDEs in $x_1$ and $x_2$.

The $2 \times 2$ matrix $A^{jk}$ is given by

\begin{equation} A^{jk} = \frac{1}{(x_1^3-x_1 x_2^2)^2} \begin{pmatrix} \frac{x_1^4+x_2^4}{4} & x_1^3 x_2 \\ x_1^3 x_2 & \frac{x_1^4-2x_1^2x_2^2}{2} \end{pmatrix} \end{equation}

and lastly, the matrix $A_{ad}$ is just the inverse of the above matrix.

I have attempted to solve these using DSolve and have produced the following code (with $y_a=0$):

A = 1/((x1^3 - x1*x2^2)^2)*{{(x1^4 + x2^4)/4, x1^3*x2}, {x1^3*
x2, (x1^4 - 2*x1^2*x2^2)/2}}

xdot = {xdot4, xdot5}

y = {y4, y5}

S = {xdotdot1, xdotdot1} + 1/2*Inverse[A].{D[#, x1], D[#, x2]} &[
xdot.A.xdot - y.A.y];

St = S /. {xdotdot1 -> x1''[t], xdotdot2 -> x2''[t], xdot1 -> x1'[t], 
xdot2 -> x2'[t], x1 -> x1[t], qx2 -> qx2[t], y1 -> 0, y2 -> 0};

system = {St[[1]] == 0, St[[2]] == 0};

DSolve[system, {x1, x2}, t]

I am fairly new to Mathematica and produced this code with a lot of help from a friend. The code works fine on simple examples where the PDEs are not coupled but in this case I just get the output


i.e. it is not able to solve them. I understand that coupled PDEs are much harder for it to solve but given that it's only a 2x2 matrix, I hope it should be doable!

I have thought about trying to use NDSolve to get a numerical solution since apparently Mathematica is good at this but the problem is I'm not sure about the initial conditions - if there's no way to get an exact solution then perhaps we can give this approach a bit more thought.

I hope I've explained the problem well. Any advice/solutions greatly appreciated.


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.