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

DE of second order

  1. Jan 9, 2014 #1
    Reading my first calculus course at my first semester as an "Computer Engineer". In Sweden it's called "Single Variable Calculus".

    I have my first exams next week and i have been solving differents of DE's.

    y'-3y'+2y = 2ex

    But now i have encountered a problem in my "partikulär lösning", z'' -z' = 2.
    Before when i just had z'' = 2, i could integrate it twice and get my solution.

    Sorry for my ignorance, im totally new and i hope i have formulated my question good.
     
  2. jcsd
  3. Jan 9, 2014 #2

    vanhees71

    User Avatar
    Science Advisor
    2016 Award

    I guess, you want to solve the differential equation
    [tex]z''-z'=2?[/tex]
    For the other one above open another thread. It's easier to just follow one question at once :-).

    This is a 2nd-order linear differential equation with constant coefficients. There's a theorem telling you that its general solution is given by the sum of one special solution of the inhomogeneous equation and the general solution of the homogeneous one. Usually one starts with the latter, i.e.,
    [tex]z''-z'=0.[/tex]
    The standard ansatz for such equations is
    [tex]z(x)=C \exp(\lambda x).[/tex]
    Plugging this into the equation, you get
    [tex]C \exp(\lambda x) (\lambda^2-\lambda)=0.[/tex]
    If [itex]C \neq 0[/itex] we must have
    [tex]\lambda^2-\lambda=0 \; \Rightarrow \; \lambda_1=0, \quad \lambda_2=1.[/tex]
    Thus the general solution of the homogeneous equation is
    [tex]z(x)=C_1+C_2 \exp x.[/tex]
    Then you need a special solution of the inhomogeneous equation.

    To that end we first integrate it once, leading to
    [tex]z'-z=2x.[/tex]
    Here we don't need to add a constant in integrating, because it's enough to find just one solution, and we don't need the most general one.

    The next idea is that a solution of this equation should be of the form
    [tex]z(x)=A x + B[/tex]
    since the right-hand side of the equation looks like it (ansatz of the type of the right-hand side). Plugging this ansatz in, we get
    [tex]A-(A x +B)=2x[/tex]
    Comparing the coefficients of powers of [itex]x[/itex] on both sides, gives
    [tex]A=-2, \quad A-B=0 \; \Rightarrow B=A=-2.[/tex]
    Thus the general solution of the inhomogeneous equation is given by is given by
    [tex]z(x)=-2x + C_1 + C_2 \exp x.[/tex]
    Here, I've lumped the constant part [itex]-2[/itex] of the particular solution of the homogeneous equation into the general integration constant [itex]C_1[/itex].
     
  4. Jan 9, 2014 #3
    vanhees71, thanks for your reply. I maybe formulated my question wrong, concerning the first question above. I needed to find an "general solution for y'-3y'+2y = 2ex".

    And this general solution do i get by the theorom "the sum of "the sum of one special solution of the inhomogeneous equation and the general solution of the homogeneous one".

    But in my notes it stands that i get the general solution by the sum of the homogeneous and the "particulate"(partikulär in swedish). Is the "particulate" the same as the inhomogeneous but used as different correspondings??

    And if i have an equation z′′−z = C or an variable, should i always integrate it once before i can see which solution i might have?
     
  5. Jan 9, 2014 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    You have twice written "[itex]y'- 3y'+ 2y= 2e^x[/itex]" but that can't be right. If that were what you meant, you would have written -2y' rather than "y'- 3y'". Besides, this is titled "DE of second order". I suspect you meant [itex]y''- 3y'+ 3y= 2e^x[/itex].

    A "particular" solution (a "particulate solution" is a chemical solution that has little particles in it!) is any one function that satisfies the entire equation. That, added to the general function of the associated homogeneous equation gives the general solution to the entire equation.

    Here, using the method vanhees71 gives, you would get the "characteristic equation" [itex]r^2- 3r+ 2= (r- 1)(r- 2)= 0[/itex] so that r= 1 and 2 and the general solution to the homogenous solution is [itex]Ce^x+ De^{2x}[/itex].

    Now it is generally true that if the "right hand side" (here, [itex]2e^x[/itex] is of the form we expect for a solution of a homogenous equation (exponentials, sine and cosine, powers of x, and products of those) then a "particular solution" will be of the same kind. (If right hand side is NOT of that form, say is [itex]\sqrt{x}[/itex], tan(x), or log(x)) we would have to use a more general, and typically harder method, "variation of parameters".)

    So we would look for a solution of the form [itex]y= Ae^x[/itex]. But that is already a solution to the homogeneous equation so will give 0 no matter what A is. Instead we try [itex]y= Axe^x[/itex]. Then [itex]y'= Ae^x+ Axe^x[/itex] and [itex]y''= 2Ae^x+ Axe^x[/itex]. Putting those into the equation, we have [itex]2Ae^x+ Axe^x- 3Ae^x- 3Axe^x+ 2Axe^x= -2Ae^x= 2e^x[/itex] (notice that all terms of the form [itex]xe^x[/itex] cancel. That is precisely because [itex]e^x[/itex] itself satisfies the homogenous equation.) so that A= -1. The "specific solution" is [itex]y= -xe^x[/itex] and the general solution to the entire equation is [itex]y= Ce^x+ De^{2x}- xe^x[/itex].
     
  6. Jan 9, 2014 #5

    vanhees71

    User Avatar
    Science Advisor
    2016 Award

    I see. The other equation is solved in the same way as the example before. In German we also say "partikuläre Lösung", which just is a synonymon for "special solution".

    So for a linear differential equation you get the general solution always as the sum of a special solution of the inhomogeneous equation and the general solution of the homogeneous one.

    The solutions of the homogeneous equation build a vector space of functions with the dimension given by the order of the linear differential equation. Thus for a 2nd-order equation you need to linearly independent solutions.

    So let's solve also this example. I guess the correct equation is
    [tex]y''-3 y' + 2y=2 \exp x,[/tex]
    because you said it's a 2nd order ODE.

    Start with the homogeneous equation. Since it's an equation with constant coefficients we make the standard ansatz (which ansatz to use you have to learn by doing a lot of examples):
    [tex]y(x)=C \exp(\lambda x).[/tex]
    Putting this into the homogeneous equation gives after some algebra
    [tex]\lambda^2-3 \lambda + 2 =0.[/tex]
    The two solutions of this equation are
    [tex]\lambda_{1,2}=\frac{3}{2} \pm \sqrt{\frac{9}{4}-1}=\frac{3}{2} \pm \frac{1}{2},[/tex]
    i.e.,
    [tex]\lambda_1=2, \quad \lambda_2=1.[/tex]
    These are two different roots, and thus the ansatz gives two linearely independent solutions. The general solution of the homogeneous equation thus is
    [tex]y(x)=C_1 \exp(2 x)+C_2 \exp x.[/tex]
    Now we need a special solution of the inhomogeneous equation.

    Here we make the ansatz
    [tex]y(x)=z(x) \exp x,[/tex]
    because the right-hand side is proportional to [itex]\exp x[/itex], but since this is a solution of the homogeneous equation, you cannot simply make this ansatz. So we introduce an additional unknown function as a factor ("variation of the constant"). Plugging this into the inhomogeneous equation gives after some algebra
    [tex]z''(x)-z'(x)=2,[/tex]
    and this was the equation we solved before. Again we only need one solution, which is
    [tex]z(x)=-2x,[/tex]
    as I've shown in the previous posting.

    So finally the general solution of the inhomogeneous equation is
    [tex]y(x)=-2x \exp x + C_1 \exp x+C_2 \exp(2 x).[/tex]

    Now, after I've solved two examples for you, I recommend to post further questions on such problems to the homework section, where you don't get simply the solution but some guidance towards finding it yourself, which is much better to learn the techniques!
     
  7. Jan 9, 2014 #6
    Hallsofly, vanhees71, thanks for the replies and making it much easier to understand what i am doing!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: DE of second order
  1. Second order DE (Replies: 6)

  2. Second order linear DE (Replies: 3)

Loading...