Help with Mathematica Issue: Solving Nonlinear Second Order ODE

  • Mathematica
  • Thread starter andreasgeo
  • Start date
  • Tags
    Mathematica
In summary, you are trying to solve a nonlinear second order ode but you are not getting any output. You may have entered the equation incorrectly.
  • #1
andreasgeo
4
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
  • #2
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?
 
  • #3
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?
 
  • #4
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.
 
  • #5
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
  • #6
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!
 

1. What is Mathematica and how can it help me with solving nonlinear second order ODEs?

Mathematica is a computer program used for mathematical and scientific computations. It has a wide range of features and tools, including a powerful symbolic computation engine that can solve complex equations, such as nonlinear second order ODEs. It also has a user-friendly interface that allows for easy input and manipulation of equations.

2. How do I input a nonlinear second order ODE into Mathematica?

To input a nonlinear second order ODE into Mathematica, you can use the "DSolve" function. This function takes in the ODE and any initial conditions, and returns the general solution. You can also specify specific values for the variables in the equation using the "NDSolve" function.

3. Can Mathematica solve all types of nonlinear second order ODEs?

While Mathematica is a powerful tool for solving equations, there are some types of nonlinear second order ODEs that it may not be able to solve. These include equations with irregular singular points or equations with complicated boundary conditions. In these cases, you may need to use other methods or approaches to solve the ODE.

4. How do I interpret the solution given by Mathematica for a nonlinear second order ODE?

The solution given by Mathematica for a nonlinear second order ODE will typically be in the form of a general solution, which includes constants of integration. This solution can then be further simplified or manipulated depending on the specific problem or application. It is important to check for any boundary conditions or initial conditions that may be needed to fully define the solution.

5. Are there any resources available to help me learn how to use Mathematica for solving nonlinear second order ODEs?

Yes, there are many resources available for learning how to use Mathematica for solving nonlinear second order ODEs. These include online tutorials, user guides, and community forums where you can ask for help and guidance from other Mathematica users. There are also books and courses available that can provide more in-depth instruction on using Mathematica for mathematical and scientific computations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
146
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
419
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Special and General Relativity
Replies
4
Views
1K
Back
Top