# plot result of nonlinear differential equation

x1'[t] == x2[t]
x2'[t] == -4*y2[t]*y1[t]^2 + (2*x2[t]*y2[t])/y1[t] - (y2[t]^2*y1[t]^2)/
x1[t]^3
y1'[t] == y2[t]
y2'[t] ==
4*x2[t]*x1[t]^2 + (2*y2[t]*x2[t])/x1[t] - (x2[t]^2*x1[t]^2)/y1[t]^3


How can I plot of x1 versus x2, x1 versus y1, x1 versus y2, y1 versus y2?

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Apr 4 '15 at 15:04

You are trying to solve a set of Ordinary differential equation but you forgot to set up initial conditions.

This is just to get you started.

 eqn = { x1'[t] == x2[t],
x2'[t] == -4*y2[t]*y1[t]^2 + (2*x2[t]*y2[t])/
y1[t] - (y2[t]^2*y1[t]^2)/x1[t]^3,
y1'[t] == y2[t],
y2'[t] ==  4*x2[t]*x1[t]^2 + (2*y2[t]*x2[t])/x1[t] - (x2[t]^2*x1[t]^2)/y1[t]^3}


Some initial condition that I randomly chose as you forgot to specify them:

ics = {x1 == 1, x2 == 2, y1 == 1, y2 == 1};


The numerical solution

sol = NDSolve[Flatten[{eqn, ics}], {x1, y1, x2, y2}, {t, 0, 1}];


One of the plots you requested

 ParametricPlot[{x1[t], x2[t]} /. sol, {t, 0, 1},AxesLabel -> {x1[t], x2[t]}] Map[ParametricPlot[# /. sol, {t, 0, 1}] &,
{{x2[t], x1[t]}, {y1[t], x1[t]},
{y2[t], x1[t]}, {y2[t], y1[t]}}] // Partition[#, 2] & // Grid • how can I plot x1-x2 on the same plot with different initial conditions? please help me – merve Apr 5 '15 at 17:09
• ok I have done thank you. – merve Apr 5 '15 at 17:19