Message Boards Message Boards


Solve a system of nonlinear differential equations?

Posted 5 months ago
1 Reply
2 Total Likes

I am trying to solve a system of differential equations but the following code instead of returning the solution returns an output that simply restates the system. Can anyone suggest how I should modify the code to solve the following system of equations:

x’’(t)=x’(t)* sqrt (x’(t)^2+y’(t)^2), y’’(t)=y’(t)* sqrt (x’(t)^2+y’(t)^2) -9.82 

Initial conditions: y(0) = 0, x(0) = 0

system = {p''[x] == p'[x]*sqrt(p'[x]^2+q'[x]^2), q''[x] == q'[x]*sqrt(p'[x]^2+q'[x]^2)-9.82, p[0] == 0, q[0] ==0};
     sol = DSolve[system, {p,q}, x]

Thank you for your help.

You should use the correct syntax for the square root. DSolve cannot calculate an analytic solution, but you can find numerical solutions:

system = {p''[x] == p'[x]*Sqrt[p'[x]^2 + q'[x]^2],
   q''[x] == q'[x]*Sqrt[p'[x]^2 + q'[x]^2] - 9.82,
   p[0] == 0, q[0] == 0, p'[0] == 1, q'[0] == 1};
sol = NDSolveValue[system, {p, q}, {x, 0, .5}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract