Using Mathematica to solve 2nd order system of nonlinear ODE's

Click For Summary

Discussion Overview

The discussion revolves around the numerical integration of a second-order system of nonlinear ordinary differential equations (ODEs) using Mathematica. Participants explore issues related to stiffness in the equations, potential analytical solutions, and the impact of forcing terms on the system.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant shares their experience with a specific Mathematica code for solving a second-order system of ODEs and reports encountering a stiffness error during numerical integration.
  • Another participant suggests that the system of ODEs can be solved analytically and mentions obtaining a parametric solution.
  • A participant expresses admiration for the analytical method shared and inquires about the educational background of the contributor.
  • There is speculation about the effect of adding a forcing term (sin[w*t]) to the system, with one participant questioning the possibility of finding an analytical solution in this case.
  • Another participant expresses doubt about the analytical solvability of the modified system with the forcing term, suggesting that an approximate analytical solution might be possible under certain conditions (small coefficient a).

Areas of Agreement / Disagreement

Participants do not reach a consensus on the solvability of the modified system with the forcing term, with differing opinions on whether it can be solved analytically or only approximatively.

Contextual Notes

Participants have not fully resolved the issue of stiffness in the original ODE system or the implications of introducing a forcing term. The discussion includes assumptions about the nature of the solutions and the conditions under which they might be valid.

Who May Find This Useful

Individuals interested in numerical methods for solving ODEs, analytical techniques in differential equations, and the implications of forcing terms in dynamical systems may find this discussion relevant.

Mugged
Messages
103
Reaction score
0
Hello, I've started learning how to numerically integrate ODE's and I've run aground when i posed a 2nd order system for mathematica.

Here is my initial code:

NDSolve = [{x'[t] == -y[t] - x[t]^2, y'[t]==x[t], x[0]==1, y[0]==0.5},{x,y},{t,0,30}]

and i get an error message saying the equation becomes stiff at a certain time t. Now I have played around with different integrating methods, switching from stiff integrators to nonstiff ones...but i can't get this to work.

The code above you can probably just cut and paste into your mathematica and see for yourself.

If you know how to fix the problem, can you post the code of how you did it?

Thank you so much
 
Physics news on Phys.org
The two ODE system can be analytically solved. The solution is obtained on a parametric form.
 

Attachments

  • Analytic solution.JPG
    Analytic solution.JPG
    30.5 KB · Views: 647
wow jjacquelin, i attempted to do this recently but couldn't figure it out. you're really good thanks. I am wasnt familiar with the method you used; what class have you taken to learn this?

Also, what do you think if the system has a forcing term? for example:

x'[t] == -y[t] - x[t]^2 + sin[w*t]
y'[t]==x[t]

where sin[w*t] is the forcing term.

Im not asking you to solve this system, but do you think this can be solved analytically?
Thanks
 
what class have you taken to learn this?
Not all is learned in classes... :smile:

x'[t] == -y[t] - x[t]^2 + sin[w*t]
y'[t]==x[t]
where sin[w*t] is the forcing term.
Im not asking you to solve this system, but do you think this can be solved analytically?
It is very doubtfull that it could be.
May be we could find approximative analytical solution in case of
x'[t] == -y[t] - x[t]^2 + a*sin[w*t]
with small coefficient a.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K