Mathematica Help with Mathematica Issue: Solving Nonlinear Second Order ODE

  • Thread starter Thread starter andreasgeo
  • Start date Start date
  • Tags Tags
    Mathematica
AI Thread Summary
The discussion centers on a user's difficulty in solving a nonlinear second-order ordinary differential equation (ODE) using Mathematica. The user attempts to use the DSolve function but receives the same input as output, indicating that Mathematica cannot find a solution. The equation involves constants and terms that complicate finding an analytical solution. Responses suggest that the equation likely lacks an analytical solution, emphasizing that numerical methods may be necessary. Additionally, it is noted that entering the equation in plain Mathematica format rather than LaTeX can facilitate better assistance. Some examples illustrate that while simpler forms of ODEs can be solved analytically, more complex ones, particularly those with nonlinear terms, often do not yield analytical solutions, and users may need to explore numerical approaches or reformulate their equations for potential simplification.
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 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!
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
3K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
1
Views
3K
Replies
4
Views
3K
Back
Top