Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Non-homogenious second-order linear differential equations.

  1. Jun 22, 2011 #1
    1. The problem statement, all variables and given/known data

    20) Determine the general solution of y'' + y = sin(x).

    2. Relevant equations

    3. The attempt at a solution

    We attempt to solve this equation by the method of undetermined constants.

    So y = u(x)sin(x) (such a substitution should reduce R(x) to a polynomial with a u-differential equation with constant coefficients according to Apostol. )

    We get, after differentiation and substitution:

    u'' + 2cot(x)u = 1

    However, this equation doesn't have constant coefficients like Apostol said the method would produce. So I need some help there.

    Doing it the regular way with variation of parameters, we have:

    y = c1sin(x) + c2cos(x) + y1

    where y1 = t1(x)v1(x) + t2(x)v2(x) and

    v1(x) = sin(x)

    v2(x) = cos(x)

    The wronskian of the two functions is -1.

    After computing we get

    t1 = [itex]\frac{1}{2} {sin}^2(x)[/itex]

    t2 = [itex]\frac{sin(2x)}{4} - \frac{1}{2}x[/itex]

    So the general solution is

    y = [itex]sin(x) (c_1 + \frac{{sin}^2(x)}{2}) + cos(x) (c_2 + \frac{sin(2x)}{4} - \frac{1}{2}x)[/itex]

    But the book says the answer is:

    y = [itex](c_1 - \frac{1}{2}x)cos(x) + c_2{sin(x)}[/itex]

    Why do I keep getting extra terms?

    Edit: Never mind the second question. My solution simplifies to the book's general solution. Tricky, but I see it.
    Last edited: Jun 22, 2011
  2. jcsd
  3. Jun 22, 2011 #2
    Referred to a dover book on differential equations. Figured it out, but Apostol doesn't explain that method in the text, yet equations of that type are given in the excercises. Anyone who has Apostol volume 1 care to explain how we are supposed to solve equations of the form y'' - 3y = 2e2xsin(x) based solely on what Apostol shows?
  4. Jun 22, 2011 #3


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I don't have a copy of Apostol but the method of undetermined coefficients is the same as the annihilator method, the latter of which takes all the guesswork out of it. Look at:

    http://www.utdallas.edu/dept/abp/PDF_Files/DE_Folder/Annihilator_Method.pdf [Broken]

    and try it with your original equation.
    Last edited by a moderator: May 5, 2017
  5. Jun 24, 2011 #4
    I'm having a little trouble with the applications section too

    (Section 8.19, problem 9)

    The current I(t) at time t flowing in an electric circuit obeys the differential equation

    I''(t) + RI'(t) + I(t) = sin(ωt),

    Where R and ω are postive constants. The solution can be expressed in the form I(t) = f(t) + Asin(ωt + α) where f(t) → 0 as t → ∞, and A and α are constants depending on R and ω, with A>0. If there is a value of ω which makes A as large as possible, then ω/(2π) is called the resonance frequency of the circuit.

    a) Find all resonance frequencies when R = 1.
    b) Find all those values of R for which the circuit has resonance frequencies.


    a) I(t) is of the form c1v1(t) + c2v2(t) + I1.

    Solving for I1, using the method of undetermined coefficients, we get.

    I1 = Bcos(ωt) + Csin(ωt) where [itex]B = \frac {-R\omega}{(1 - \omega^2)^2 + (R\omega)^2}[/itex] and [itex]C = \frac {1 - \omega^2}{(1 - \omega^2)^2 + (R\omega)^2}[/itex].

    Therefore [itex]A = \sqrt{B^2 +C^2} = \sqrt{\frac{1}{(1 - \omega^2)^2 + (R\omega)^2}}[/itex].

    A is maximized when the denominator approches 0.

    So, for R = 1, we need to solve [itex](1 - \omega^2)^2 + \omega^2 = 0[/itex].

    Expanding and rearranged, we get [itex]\omega^4 - \omega^2 + 1 = 0[/itex]. But solving for ω2, we get complex number pairs and not a real pair. I know we have to take both roots of the real number(s) to solve for ω. And for all the real solutions, we have to divide by 2π. But there no real solutions, yet the book has one resonance frequency.

    b) If you guys help me with (a) I can figure it out. We want an R such that we at least one real root.
    Last edited: Jun 24, 2011
  6. Jun 24, 2011 #5


    User Avatar
    Science Advisor

    No, you do not have to take "roots of the real numbers", if you solve for [itex]\omega^2[/itex] then to find [itex]\omega[/itex] you have to take the square roots of those two solutions whether they are real or not.

    [tex] And for all the real solutions, we have to divide by 2π. But there no real solutions, yet the book has one resonance frequency.

    b) If you guys help me with (a) I can figure it out. We want an R such that we at least one real root.[/QUOTE]
    No, you don't.
    The characteristic equation is [itex]\lambda^2+ R\lambda+ 1= 0[/itex] which has roots [tex]\lambda= \frac{-R\pm\sqrt{R^2- 4}}{2}[/tex]
    which lead to solutions of the associated homogeneous equation of the form
    [tex]e^{-(R/2)x}\left(Ccos((\sqrt{R^2- 4}/2)x)+ Dsin(\sqrt{R^2- 4}/2)x)[/tex]

    A particular solution of the entire equation will be of the form y= Asin(x)+ Bcos(x) unless there is already of solution to the associated homogeneous equation in which case you have to multiply by t: y= Ax sin(x)+ Bxcos(x). Here, that does not happen exactly but you will get resonance if the solutions come close- ifthe arguments of sine and cosine in the solution to the homogeneous equation are x- that is if
    [tex]\frac{\sqrt{R^2- 4}}{2}= 1[/tex]
  7. Jun 24, 2011 #6
    I solved for the four roots of omega, and they are all complex numbers of the form re(z) = +-sqrt(3)/2 and im(z)= +-1/2, but the soution for the frequency is 1/(2*pi*sqrt(2). Also for b, the solution is R < sqrt(2). I do not see how we get those answers from what we know.
  8. Jun 24, 2011 #7
    I figured it out for anyone interested. Since omega never approches zero, we have to find the minimum of the denominator, using differential calculus.
  9. Jun 25, 2011 #8
    For the first post...
    My solution is (sorry for not using LaTeX):


    let y=e^mx
    where i= sqr (-1)
    yc= C1cosx+C2sinx

    m'=+or-i taken twice as a root

    equating coefficients:
    sinx: -2A=1
    cosx: 2B=0

    sustitution in yp:

    general solution is:
    y= C1cosx+C2sinx-1/2xcosx

    y= (C1-1/2x)cosx+C2sinx ans.

    hope it helps.
  10. Jun 25, 2011 #9
    you can also solve it by inspection:
    if R(x)=sinx or R(x)=cosx
    and bn=0
    then (D^2-a^2)y=sinbx
    yp=-cosbx/(a^2+b^2) respectively.

    this cuts down the very long solution.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook