Second order ODE into a system of first order ODEs

Click For Summary

Homework Help Overview

The discussion revolves around converting a second-order ordinary differential equation (ODE) related to a harmonic oscillator into a system of first-order ODEs. The equation includes a forcing function, and the original poster expresses uncertainty about the treatment of this forcing function in their formulation.

Discussion Character

  • Exploratory, Assumption checking

Approaches and Questions Raised

  • The original poster attempts to define a system of first-order ODEs by introducing new variables for position and velocity. They question whether they have correctly accounted for the forcing function in their equations.

Discussion Status

Participants are engaging with the original poster's approach, with some questioning the handling of the forcing function. There is a suggestion that the original poster may have inadvertently omitted important terms from their equations. Initial conditions are also raised as a potential point of consideration.

Contextual Notes

The original poster mentions the need to implement the system in Python for plotting results, indicating a practical application of the theoretical problem. There is an implication that certain assumptions or initial conditions may be necessary for a complete solution.

whatisgoingon
Messages
9
Reaction score
0

Homework Statement


The harmonic oscillator's equation of motion is:

x'' + 2βx' + ω02x = f

with the forcing of the form f(t) = f0sin(ωt)

The Attempt at a Solution



So I got:
X1 = x
X1' = x' = X2
X2 = x'
X2' = x''
∴ X2' = -2βX2 - ω02X1 + sin(ωt)

The function f(t) is making me doubt this answer because I have to take into account f0 and it just disappears in the solution.

(For context I have to put it into a system of first order ODEs because I have to code it into python and plot the results with the given parameters.)

Am I on the right track? Or am I missing anything?
 
Physics news on Phys.org
whatisgoingon said:
it just disappears in the solution
Looks to me you made it disappear in the equations already.
 
BvU said:
Looks to me you made it disappear in the equations already.
Oh so I shouldn't have taken it out in the first place then? That makes sense thanks! Other than that, am I missing anything else?
 
Initial conditions ?
 

Similar threads

Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
8K
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
2K