Help in second order ode numeric solution

In summary, the conversation discusses the issue of periodic behavior when solving a set of two first order ODE using finite differences. The suggested solutions are to use a higher order numerical method or a symbolic solver for better accuracy.
  • #1
Johnbasko
5
0
Dear all,

Im trying to solve the following ode:

y'' = -0.12*y + 0.4/sqrt(y^2 + 5.76) , y=y(t) , t: [-50,50]
y(-50)=2.3 , y'(-50)=0

i changed it to a set of two first order ode using z=y'
and solve it with finite differences.

note that the right side doesn't depend on t.

the solution start good and raise till a pick point and than decay till zero, the problem it that when it decay to zero, infact i received again that y=y'=z=0 meaning I am reaching my initial point and than the solution raise again to a pick point and decay again to zero etc etc...

the real solution should raise , reach the pick when t=0 and decay again to zero till t=50.

how can i solve that issue and stop the periodic behaviour when it decay to zero ?

thanks a lot
 
Physics news on Phys.org
  • #2
The issue you are facing is likely due to the numerical method you are using for solving the ODE. Finite differences is not the best method for solving this type of ODE as it is not very accurate. You should consider using a higher order numerical method such as Runge-Kutta, which is more accurate and can provide you with better results. Alternatively, you could also try using a symbolic solver such as Mathematica or Maple to solve the ODE analytically.
 

1. How do I solve a second order ODE numerically?

To solve a second order ODE numerically, you can use various methods such as Euler's method, Runge-Kutta methods, or the Adams-Bashforth method. These methods involve breaking down the ODE into a system of first order ODEs, which can then be solved using numerical techniques.

2. Can I use a computer program to solve a second order ODE numerically?

Yes, there are many software programs available that can help you solve second order ODEs numerically. Some popular options include MATLAB, Python, and Mathematica. These programs have built-in functions and libraries specifically designed for solving ODEs.

3. Is there a specific method that is best for solving second order ODEs numerically?

The best method for solving a second order ODE numerically depends on the specific problem at hand. Different methods may be more efficient or accurate for certain types of ODEs. It is important to consider the properties of your ODE and choose a method that suits your needs.

4. How do I know if my numerical solution for a second order ODE is accurate?

You can assess the accuracy of your numerical solution by comparing it to an analytical solution, if one is available. You can also check the convergence of your numerical method by decreasing the step size and observing how the solution changes. A more accurate solution should approach the true solution as the step size decreases.

5. Are there any limitations to using numerical methods for solving second order ODEs?

Yes, there are some limitations to using numerical methods for solving ODEs. These methods may not always provide an exact solution and can introduce errors. They also require knowledge of the initial conditions and may not work well for stiff ODEs. It is important to understand the limitations of these methods and choose the appropriate one for your problem.

Similar threads

  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
2
Views
1K
Replies
2
Views
2K
Replies
3
Views
779
Replies
1
Views
923
  • Differential Equations
Replies
9
Views
2K
Replies
2
Views
2K
  • Differential Equations
Replies
7
Views
1K
Replies
24
Views
3K
Back
Top