Help with Mathematica Issue: Solving Nonlinear Second Order ODE

  • Context: Mathematica 
  • Thread starter Thread starter andreasgeo
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 3K views
andreasgeo
Messages
3
Reaction score
0
Mathematica Issue -- Help!

Hello! I am new to Mathematica and i tried to solve a non linear second order ode... The result is that nothing happens... I mean that i get as output the same line as i write in input.. For example, my problem is: (thats what i get)

In[33]:= DSolve[ g - b x - c y[x] - f y[x]^2 + a Derivative[1][y][x]^2 +
d (y^\[Prime]\[Prime])[x] + a y[x] (y^\[Prime]\[Prime])[x] == 0,
y[x], x]

Out[33]= DSolve[ g - b x - c y[x] - f y[x]^2 + a Derivative[1][y][x]^2 +
d (y^\[Prime]\[Prime])[x] + a y[x] (y^\[Prime]\[Prime])[x] == 0,
y[x], x]

What am i doing wrong? Or maybe that means that it can't be solved? I don't want a numerical solution but an exact analytical one (if there exists)...
And btw g,b,c,f,a are constants.
 
Physics news on Phys.org
That is what happens when there is no known analytical solution. You will have to solve it numerically.

However, you may have entered it in incorrectly. What are you trying to solve?
 
i am tryin to solve this (sorry i am not good writin it in latex):

d*y''(x)+a*y(x)*y''(x)+a*(y'(x))^2-b*x-c*y(x)-f*(y(x))^2-g=0

as i said before, d,a,c,b,g are arbitrary constants...
Am i writing this wrong, or there is not analytical solutions?
 
For Mathematica questions showing "plain Mathematica" is usually better than Latex so that someone doesn't have to undo all the work you just did to turn it into Latex just to get it back into Mathematica.

Mathematica can easily solve this

In[1]:= DSolve[a*y''[x] + b*y'[x] + c*y[x] + d == 0, y[x], x]

Out[1]= {{y[x]->-(d/c)+E^(((-b-Sqrt[b^2 -4a c])x)/(2a))C[1] + E^(((-b+Sqrt[b^2-4a c])x)/(2 a)) C[2]}}

but not this

In[2]:= DSolve[a*y''[x] + b*y'[x] + c*y[x]^2 + d == 0, y[x], x]

Out[2]= DSolve[d + c y[x]^2 + b y'[x] + a y''[x] == 0, y[x], x]

so unless your more complicated equation happened to be a special form there is little hope.

If you knew some or all the exact values of your constants there might be a chance.
 
andreasgeo said:
Am i writing this wrong, or there is not analytical solutions?
There is no analytical solution. You will have to do it numerically.
 
  • Like
Likes   Reactions: 1 person
Sometimes (read: when you have some idea of what your solution should look like, at least qualitatively), you can rewrite your function as another function or your variable as another variable (the radial dependence of the spherical wave function in the separation-of-variables method comes to mind) to turn your equation into something simpler. Your equation looks like something I never want to have to solve, so this might be impossible in your case, but it could be worth a try.

Cheers!