# Real quick question on 2nd order differential equation

1. Apr 23, 2007

### rcw110131

1. The problem statement, all variables and given/known data

How do I go about solving $d^2\theta/dt^2+ (g/L) \theta= g$? It's been 2.5 years since I had diff eq.

2. Relevant equations

^

3. The attempt at a solution

I don't know. I've spent the past 2 hours going through old books and searching online and still can't figure it out

Last edited: Apr 23, 2007
2. Apr 23, 2007

### denverdoc

Heres a quick and decent review of homogeneous and nonhomogenous second order diffyq's

http://www.haverford.edu/physics-astro/MathAppendices/Differential_Eqs.pdf [Broken]

Last edited by a moderator: May 2, 2017
3. Apr 23, 2007

### denverdoc

also since this looks a lot like a pendulum problem, curious as to the problem that gave rise to it, ie the pendulum would be the homogeneous soln where right side eqn=0.

4. Apr 23, 2007

### rcw110131

It's the problem a few posts below about a father pushing a child on a swing. If you have any other help I'd greatly appreciate it.

5. Apr 23, 2007

### denverdoc

i see, i'd just repost your query there. I'd help but gotta earn a living today

6. Apr 23, 2007

### HallsofIvy

Staff Emeritus
This is more math than physics but here is how: first ignore the "g" on the right hand side to get the "associated homogeneous equation" $d^2\theta/dt^2+ (g/L)\theta= 0$. It's "characteristic equation" is $r^2+ (g/L)= 0$ which has imaginary roots: $r= \pm \sqrt{g/L}$ and so the homogeneous equation has general solution $Ccos(\sqrt{g/L}t)+ Dsin(\sqrt{g/L}t)$.

Now, since the righthand side of the orginal equation was a constant, g, we "look for" a constant solution, y= A, to the entire equations. y'= 0 so the equation becomes 0+ (g/L)A= g and so A= L. The general solution to the entire equation is $y(t)= C cos(\sqrt{g/L}t)+ D sin(\sqrt{g/L}t)+ L$.

7. Apr 23, 2007

### rcw110131

Thank you so much, I can't even tell you how much I appreciate your help! I finally got it; using the initial conditions, C ends up as 1-L, and then taking the derivative and using the initial conditions again, D has to equal zero, leaving only the cosine term and the L. Thanks again!!!!