Help with Mathematica Issue: Solving Nonlinear Second Order ODE

  • Context: Mathematica 
  • Thread starter Thread starter andreasgeo
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary

Discussion Overview

The discussion revolves around solving a nonlinear second order ordinary differential equation (ODE) using Mathematica. Participants explore the challenges of obtaining an analytical solution and consider the possibility of numerical solutions instead.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their attempt to solve a nonlinear second order ODE in Mathematica, noting that the output is the same as the input, suggesting a lack of analytical solution.
  • Another participant suggests that the issue may arise from the absence of a known analytical solution and prompts the original poster to clarify their equation.
  • A participant provides a simpler example of an ODE that Mathematica can solve, contrasting it with the original equation, implying that complexity may hinder finding a solution.
  • One participant asserts that there is no analytical solution for the original equation and recommends numerical methods instead.
  • Another participant proposes that rewriting the function or variable might simplify the equation, although they express skepticism about the feasibility of this approach for the given problem.

Areas of Agreement / Disagreement

Participants generally agree that the original equation may not have an analytical solution, but there is no consensus on the specific reasons or methods for addressing the problem. Multiple views on how to approach the equation remain present.

Contextual Notes

Participants mention the importance of correctly formatting the equation in Mathematica and the potential impact of the constants involved on the solvability of the ODE.

Who May Find This Useful

This discussion may be useful for individuals working with nonlinear ODEs, particularly those using Mathematica, and for those interested in the challenges of finding analytical versus numerical solutions.

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!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K