Simple ODE, I don't know what I'm doing wrong

  • Thread starter Thread starter HmBe
  • Start date Start date
  • Tags Tags
    Ode
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
HmBe
Messages
45
Reaction score
0

Homework Statement



solve x''(t)+w2x(t)=-gsin(a) with x(0)'=0 x(0)=-gsin(a)/w2


Homework Equations





The Attempt at a Solution



let x=Acoswt+Bsinwt+C
x'=0 so B=0

x=Acoswt+C
c=-gsina/w2

t=0, x=A-gsina/w2
but x(0)=-gsin(a)/w2

so A=0, and you get x is a constant, which makes no sense for the situation.
 
Last edited:
Physics news on Phys.org
It may make no sense, but it does work. I checked it, and your solution matches the conditions for the differential equation.
 
HmBe said:

Homework Statement



solve x''(t)+w2x(t)=-gsin(a) with x(0)'=0 x(0)=-gsin(a)/w2


Homework Equations





The Attempt at a Solution



let x=Acoswt+Bsinwt+C
x'=0 so B=0

x=Acoswt+C
c=-gsina/w2

t=0, x=A-gsina/w2
but x(0)=-gsin(a)/w2

so A=0, and you get x is a constant, which makes no sense for the situation.

You need to get the general solution of the non-homogeneous equation before you plug in the initial conditions to evaluate the constants. You have the general solution of the homogeneous equation:

xc = A cos(wt) + B sin(wt)

The next step is to find a particular solution xp of the non-homogeneous equation. So figure out what C will give

xp = C

as a solution of the NH equation. This has nothing to do with the initial conditions. Once you have C figured out your general solution is

xc = A cos(wt) + B sin(wt) + C

Only then should you plug in the initial conditions for x(0) and x'(0) to figure out A and B.