SHM - as two ordinary linear differential equations

In summary: We can rewrite this as:y'' + ert = 0y'' = w2y = 0y(t) = erty''(t) = r2ertay'' + by'...We can solve for y by substituting y(t) into both y''(t) and y''(t) = r2ert and solving for y.In summary, the homework statement is asking for a solution to a second order ordinary differential equation. The student has found a solution by rewriting the equation as a system of two first order equations and solving them.
  • #1
leonmate
84
1

Homework Statement



I've attached an image of the problem question, it's Q1 I'm working on

This is what I have so far:
we have two components of SHM, position x and velocity v.

when x = 0, v = a maximum, when v = 0, x = a maximum

this is represented by sin & cos functions.

where x = A*sin(w*t*phi)

and v = A*w*cos(w*t*phi)Here it can be shown that a = -w^2 * x

thus, dv/dt = -w^2 * x

and, dv/dt = dv/dx * dx/dt = -w^2 * x

and, v*dv/dx = -w^2 * x

then we're left with differential equation, v*dv = -w^2 *x*dxSo the last equation: v dv = -ω2x dx
Would this be considered two linear ordinary equations?? I'm a little unsure about the question is actually asking me - 'the analytical solution'

I've got to code this with python, and solve using euler and fourth-order Runge-Kutta method - I've already made solver functions to do both these things, I just can't progress past q1! ..frustratingAny help would be very appriciated

Leon
 

Attachments

  • Q1.jpeg
    31.1 KB · Views: 409
  • Assignment1.pdf
    87.3 KB · Views: 282
Physics news on Phys.org
  • #2
leonmate said:

Homework Statement



I've attached an image of the problem question, it's Q1 I'm working on

This is what I have so far:
we have two components of SHM, position x and velocity v.

when x = 0, v = a maximum, when v = 0, x = a maximum

this is represented by sin & cos functions.

where x = A*sin(w*t*phi)

and v = A*w*cos(w*t*phi)Here it can be shown that a = -w^2 * x

thus, dv/dt = -w^2 * x

and, dv/dt = dv/dx * dx/dt = -w^2 * x

and, v*dv/dx = -w^2 * x

then we're left with differential equation, v*dv = -w^2 *x*dxSo the last equation: v dv = -ω2x dx
Would this be considered two linear ordinary equations?? I'm a little unsure about the question is actually asking me - 'the analytical solution'

I've got to code this with python, and solve using euler and fourth-order Runge-Kutta method - I've already made solver functions to do both these things, I just can't progress past q1! ..frustratingAny help would be very appriciated

Leon
I'm not sure I follow what you are doing here. Have you studied ordinary differential equations and how to solve them in a separate course?

The second-order ODE, y" + ω2y = 0, describes the motion of an undamped oscillator.

The 'analytical solution' described in the assignment means the non-numerical solution to this equation which would be obtained by using the methods for solving such equations. This is a linear homogeneous second order differential equation with constant coefficients, so there are solution methods readily available:

http://tutorial.math.lamar.edu/Classes/DE/SecondOrderConcepts.aspx

In solving such equations numerically, the usual numerical procedures, like Euler's method or Runge-Kutta, can solve only first-order differential equations. What this assignment requires you to do is re-write the original second-order differential equation as a system of two first-order equations, and then solve this system numerically.
 
  • #3
I think you're not doing what they want in the order they want. Also to say 'it can be shown' I thought was a privilege reserved for textbook writers.

I think they want you to multiply the given equation by y and do the operations you may or may not remember to get to express in terms of the concepts of potential and kinetic energy. If it doesn't come back to you look in your intermediate level physics textbook.
 
  • Like
Likes rude man
  • #4
epenguin said:
.
"RSVP! If I trouble to help your homework and you never reply or react I will enter your name in a black book and not help you next time. I may do this if you let the thing drop before any conclusion reached.
Don't tell us you have got the answer, tell us the answer you have got!


Beautiful! Wish I had thought of it myself. It would discourage turn-key solution hunters.
 
  • #5
SteamKing said:
I'm not sure I follow what you are doing here. Have you studied ordinary differential equations and how to solve them in a separate course?

The second-order ODE, y" + ω2y = 0, describes the motion of an undamped oscillator.

The 'analytical solution' described in the assignment means the non-numerical solution to this equation which would be obtained by using the methods for solving such equations. This is a linear homogeneous second order differential equation with constant coefficients, so there are solution methods readily available:

http://tutorial.math.lamar.edu/Classes/DE/SecondOrderConcepts.aspx

In solving such equations numerically, the usual numerical procedures, like Euler's method or Runge-Kutta, can solve only first-order differential equations. What this assignment requires you to do is re-write the original second-order differential equation as a system of two first-order equations, and then solve this system numerically.

I did do a course with ODEs, but I wound up taking some time off and my memory of them isn't great. I probably need to go over it much more as this course progresses.

So, I had a read through that site - very helpful thank you.

This is what I've come up with...

y'' = w2y = 0
y(t) = ert
y''(t) = r2ert
ay'' + by' + cy = 0
r2 + w2 = 0
r = ±2π i (w = 2π)

y(t) = c1 cos (2πt) + c2 sin (2πt)
y'(t) = -2πt c1 sin (2πt) + 2πt c2 cos (2πt)

Plug in my y(0) = 1 and y'(0) = 0

gives c1 = 1, c2 = 0

and y(t) = cos(2πt)and now I'm a little lost again. Am I heading in the right direction with this working?

Leon
 
  • #6
leonmate said:
I did do a course with ODEs, but I wound up taking some time off and my memory of them isn't great. I probably need to go over it much more as this course progresses.

So, I had a read through that site - very helpful thank you.

This is what I've come up with...

y'' = w2y = 0
y(t) = ert
y''(t) = r2ert
ay'' + by' + cy = 0
r2 + w2 = 0
r = ±2π i (w = 2π)

y(t) = c1 cos (2πt) + c2 sin (2πt)
y'(t) = -2πt c1 sin (2πt) + 2πt c2 cos (2πt)

Plug in my y(0) = 1 and y'(0) = 0

gives c1 = 1, c2 = 0

and y(t) = cos(2πt)and now I'm a little lost again. Am I heading in the right direction with this working?

Leon
If c1 = c2 = 0, then y(t) = 0.

Go back to the solution of the characteristic equation r2 + ω2 = 0

How did you arrive at r = ±2π i ?

Re-writing, r2 = -ω2, so what should r be?
 
  • #8
"Write the second-order equation for the harmonic oscillator,
y'' + ω2y = 0
as two linear ordinary differential equations."


You're still not doing what was asked, which was to reduce the one second-order ODE into two 1st order ODE's.
Hint: let u = dy/dt, then
form two 1st order ODE's in u' and y'.
 
  • #9
Hey guys,

I've worked through some more, here's what I have

y1(t) = (cos(wt) + i sin(wt))
y2(t) = (cos(wt) - i sin(wt))

y(t) = A y1(t) + B y2(t)

y(t) = A(cos(wt) + i sin(wt)) + B(cos(wt) - i sin(wt))
y'(t) = Aw(-sin(wt) + i cos(wt)) + Bw(-sin(wt) - i cos(wt))

Plug in boundary conditions:

y(0) = 1

1 = A( 1 + 0 ) + B( 1 - 0 ) = A + B

y'(0) = 0

0 = Aw( 0 + i ) + Bw( 0 - i)
0 = Awi - Bwi
0 = A - B

A = B = ½

(w = 2π given in question)y(t) = ½cos(2πt) + ½sin(2πt)

let u = y' = -π sin(2πt) + π cos(2πt)

u' = y'' = - 2π2cos(2πt) - 2π2sin(2πt)

We're given the equation y'' + w2y = 0 so we can test

- 2π2cos(2πt) - 2π2sin(2πt) + 4π2(½cos(2πt) + ½sin(2πt)) = 0
- 2π2cos(2πt) - 2π2sin(2πt) + 2π2cos(2πt) 2π2sin(2πt) = 0

...then i get stuck
I also did this, which makes more sense but I don't know if it's right

y = cos(wt)
y = cos(2πt)
u = y' = - 2π sin(2πt)
u' = -4π2cos(2πt) = -4π2y
du / dt = -4π2y

du = dy/dt

dy / y = -4π2 dt2
 
  • #10
My lecturer gave me this, the first two slides are relevant
 

Attachments

  • SHM.pdf
    861.3 KB · Views: 205
  • #11
leonmate said:
I also did this, which makes more sense but I don't know if it's right
y = cos(wt)
y = cos(2πt)
u = y' = - 2π sin(2πt)
u' = -4π2cos(2πt) = -4π2y
du / dt = -4π2y
du = dy/dt
dy / y = -4π2 dt2
Your y(t) and u(t) are corect. Don't know why you continue with du/dt etc. You were asked to provide y(t) only in part 1.
I can't assist after that.
 
  • #12
rude man said:
Your y(t) and u(t) are corect. Don't know why you continue with du/dt etc. You were asked to provide y(t) only in part 1.
I can't assist after that.

Ok, how do I get y = cos(wt)

I got it once, now everytime I do it I end up with a sin in there.

y'' + w2y = 0
y(t) = ert
y''(t) = r2ert
ay'' + by' + cy = 0
r2 + w2 = 0
r = ±2π i (w = 2π)

y(t) = c1 cos (2πt) + c2 sin (2πt)
y'(t) = -2πt c1 sin (2πt) + 2πt c2 cos (2πt)

Plug in my y(0) = 1 and y'(0) = 0

gives c1 = 1, c2 = 0

and y(t) = cos(2πt)

Is this correct?
 
  • #13
leonmate said:
Ok, how do I get y = cos(wt)
I got it once, now everytime I do it I end up with a sin in there.
Where? I see only cosines, in both ways you did it.
y'' + w2y = 0
y(t) = ert
y''(t) = r2ert
ay'' + by' + cy = 0
r2 + w2 = 0
r = ±2π i (w = 2π)
y(t) = c1 cos (2πt) + c2 sin (2πt)
y'(t) = -2πt c1 sin (2πt) + 2πt c2 cos (2πt)
Plug in my y(0) = 1 and y'(0) = 0
gives c1 = 1, c2 = 0
and y(t) = cos(2πt)
Is this correct?
yes.
y'' + w2y = 0
y(t) = ert
y''(t) = r2ert
ay'' + by' + cy = 0
r2 + w2 = 0
r = ±2π i (w = 2π)
y(t) = c1 cos (2πt) + c2 sin (2πt)
y'(t) = -2πt c1 sin (2πt) + 2πt c2 cos (2πt)
Plug in my y(0) = 1 and y'(0) = 0
gives c1 = 1, c2 = 0
and y(t) = cos(2πt)
Is this correct?
Since it's a duplicate of what you just wrote above, the answer had better be Yes here too, hadn't it!
So where's the sine term(s) in y(t)?
 
  • #14
You were asked to derive from the second order equation two first order ones and then from those solve analytically.
It seems to me you have first solved and then tried to derive the equations from the solutions! Maybe not yet successfully.

If you feel stuck after all this you might give consideration to #3 which is a couple of lines and seems to me what is being asked.
 
Last edited:

1. What is SHM?

SHM stands for Simple Harmonic Motion. It is a type of periodic motion where the restoring force is directly proportional to the displacement from equilibrium. This type of motion is commonly seen in pendulums, springs, and other vibrating systems.

2. What are the two ordinary linear differential equations used to describe SHM?

The two ordinary linear differential equations used to describe SHM are the displacement equation, x'' + (ω2)x = 0, and the velocity equation, v' + (ω2)x = 0. Here, ω represents the angular frequency, which is determined by the mass and spring constant of the system.

3. How is SHM different from other types of motion?

SHM is different from other types of motion because it is a type of oscillatory motion where the object moves back and forth around an equilibrium position. This motion is caused by a restoring force that always points towards the equilibrium point, which makes the motion repetitive and periodic.

4. What are some real-life examples of SHM?

Some real-life examples of SHM include the motion of a swing, the motion of a car's suspension system, and the motion of a diving board. In all of these cases, the object is undergoing harmonic motion due to the force of gravity or a spring.

5. How is SHM related to energy?

SHM is related to energy because the total energy of a system undergoing SHM remains constant. As the object moves back and forth, kinetic energy is converted into potential energy and vice versa. This allows the system to maintain a constant energy level throughout the motion.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
21
Views
849
  • Differential Equations
Replies
2
Views
996
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
287
Replies
4
Views
1K
  • Classical Physics
Replies
11
Views
1K
  • Differential Equations
Replies
1
Views
1K
Back
Top