Second order ODE into a system of first order ODEs

  • #1

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?
 

Answers and Replies

  • #2
BvU
Science Advisor
Homework Helper
2019 Award
13,588
3,283
it just disappears in the solution
Looks to me you made it disappear in the equations already.
 
  • #3
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?
 
  • #4
BvU
Science Advisor
Homework Helper
2019 Award
13,588
3,283
Initial conditions ?
 

Related Threads on Second order ODE into a system of first order ODEs

Replies
2
Views
2K
Replies
6
Views
2K
Replies
0
Views
3K
Replies
2
Views
3K
  • Last Post
Replies
14
Views
2K
  • Last Post
Replies
3
Views
881
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
11
Views
765
Replies
8
Views
763
Replies
0
Views
1K
Top