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

Homework Help: Laplace transform (solve an IVP)

  1. Sep 21, 2008 #1
    1. The problem statement, all variables and given/known data
    Solve the IVP for t>0

    y'(t)+\int^{t}_{0}y(\tau)d\tau =
    =sin(t) for 0<t<=pi
    =0 for t>pi

    3. The attempt at a solution
    The solution depends on how large t is and therefore the solution consist of two parts depending on the size of t..
    Let's call them y1(t) (for 0<t<=pi) and y2(t) (for t>pi)

    This is solved using Laplace transform.
    for y2, after Laplacetransform, Y(s) is called just Y for convenience.

    Then using inverse lapcace transform
    ==> y2(t)=-cos(t)

    then for y1:


    First of all, is it correct so far?
    And how do I continue the simplification from here to be able to use inverse lapace transform?
    1. The problem statement, all variables and given/known data

    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. Sep 21, 2008 #2
    I would write the RHS (the excitation) as
    x(t)=\sin(t)U(t)+\sin (t-\pi) U(t-\pi)

    sY+1+Y/s=\dfrac{1}{s^{2}+1}(1+e^{- \pi s})
    Y(s)=\dfrac{s}{(s^2+1)^2}(1+e^{-\pi s}) - \dfrac{s}{s^2+1}


    Hopefully I got my algebra right.
    Last edited: Sep 21, 2008
  4. Sep 22, 2008 #3
    Hmm, I don't really understand.
    I think that you rewrite the RHS in a smart way so that both cases 0<x<=pi and x>pi are "built in" in one expression, right?
    Was my approach wrong (I guess so), but why?

    What is U(x)? I have only solved more simple and straightforward IVPs with Laplace transform before. A few words about how you think would be very appreciated!
  5. Sep 22, 2008 #4


    User Avatar
    Homework Helper

    He meant u(t). That is the Heaviside function or unit step function. So what this means is:
    [tex]f(t)[u(t-a) - u(t-b)] = f(t) \ \mbox{when} \ t \in (a,b)[/tex]
    and [tex] 0 \ \mbox{everywhere else} [/tex].

    Your approach is fine as well, but it results in having to split the solution into two separate intervals to solve.
  6. Sep 22, 2008 #5
    I don't remember how I did this in Calculus II (that was 14 years ago) but I do remember in the "Analysis of Elementary Linear circuits" class, and the following "Signals and Systems" class, we were taught to decompose the finite duration of excitation into sum of time shifted signals so that we can take the advantage of a very useful Laplace transform property

    L {f(t-\alpha)u(t-\alpha)} =e^{-\alpha s}F(s)

    which is usually easier to work with. and it's an important link between Laplace transform and z-transform.

    To be honest, I don't see how your approach is wrong.

    Yes, I mean "Unit Step" or "Heaviside step function" see http://en.wikipedia.org/wiki/Heaviside_step_function

    and it's usually written in lower case as Defennder pointed out.
  7. Sep 23, 2008 #6
    Hello wahoo2000,

    I sorta, kinda know what is causing your problem, although I couldn't explain it in pure math context. Your ODE basically describes an inductor and a capacitor connected in serial driven by a voltage source which is a half sinusoid, the solution y(t) is the loop current for t>0

    The physical meaning of y2(t) as the way you set it up (sY-y(0)+Y/s=0), is the system response due to the non-zero initial condition in absence of source. We EE call it Zero-Input-Response or ZIR. Note that 0<t<+infty.

    y1 in this case, the physical meaning is that the circuit is driven by a STEADY sinusoid for t>0, with non-zero initial value taken into account. So even you find out y1 in this way, y1+y2 is not the solution given the source condition and initial condition. Further more y1 is divergent (something t times sin) due to lack of damping term in the ODE. We know that the solution should be oscillated (undamped) but not divergent because the source has finite duration and there is no negative resistence component.

    Hope that helps. I hope someone can explain it in a more mathematical way.
    Last edited: Sep 23, 2008
  8. Sep 23, 2008 #7


    User Avatar
    Science Advisor

    Engineers love "Laplace transforms". I don't. Here's how I would have done this problem.
    [tex]y'+ \int y(\tau)d\tau= cos(t)[/tex] for [tex]0\le t\le \pi[/tex]
    [tex]y'+ \int y(\tau)d\tau= 0[/tex] for t> [tex]\pi[/tex]
    y(0)= -1.

    Differentiate both sides of the equation to get rid of the integral:
    y"+ y= -sin(t) for [itex]0\le t\le \pi[/itex]
    y"+ y= 0 for [itex]t> \pi[/itex]

    y"+ y= 0 has general solution y(t)= Ccos(t)+ Dsin(t) and we seek a specific solution to the entire equation of the form y= At cos(t). Then y'= Acos(t)- Atsin(t), y"= -2A sin(t)- Atcos(t). y"+ y= -2A sin(t)= -sin(t) so A= 1/2. y(t)= Ccos(t)+ Dsin(t)+ (1/2)t cos(t) satisfies the equation for t between 0 and [itex]\pi[/itex]. When t= 0, y(0)= C= -1.
    We also note that, from the original equation,
    [tex]y'(0)+ \int_0^0 y(\tau)d\tau= y'(0)= cos(0)= 1[/itex]
    From y(t)= Ccos(t)+ Dsin(t)+ (1/2)t cos(t), y'(t)= -C sin(t)+ Dcos(t)+ (1/2)cos(t)- (1/2)tsin(t) so y'(0)= D+ 1/2= 1 so D= 1/2
    For [itex]0\le t\le \pi[/itex]
    y(t)= -cos(t)+ (1/2)sin(t)+ (1/2)tcos(t).
    [itex]y(\pi)= -cos(\pi)+ (1/2)sin(\pi)+ (1/2)\pi cos(\pi)= -1- (1/2)\pi[/itex]

    y'(t)= sin(t)+ (1/2)cos(t)+ (1/2) cos(t)- (1/2)tsin(t)= sin(t)+ cos(t)- (1/2)t sin(t)
    [itex]\y'(\pi)= sin(\pi)+ cos(\pi)- (1/2)\pi sin(\pi)= -1-(1\2)\pi[/itex]
    so now we solve the initial value problem
    y"+ y= 0, [itex]y(\pi)= -1- (1/2)\pi[/itex], [itex]y'(\pi)= -1-(1/2)\pi[/itex]
    for [itex]x> \pi[/itex].
    The general solution to y"+ y= 0 is, of course, y(t)= Ccos(t)+ Dsin(t).
    [itex]y(\pi)= C cos(\pi)+ Dsin(\pi)= -C= -1-(1/2)\pi[/itex] or [itex]C= 1+ (1/2)\pi[/itex]
    y'(t)= -Csin(t)+ Dcos(t) so
    [itex]y'(\pi)= -D= -1-(1/2)\pi[/itex] or D= [itex]1+ (1/2)\pi[/itex] also.

    y(t)= -cos(t)- (1/2)sin(t)+ (1/2)tcos(t) for [itex]0\le t\le\pi[/itex]
    = (1+ (1/2)[itex]\pi[/itex])(cos(t)+ sin(t)) for [itex]x> \pi[/itex]
  9. Sep 23, 2008 #8
    Thanks for HallsofIvy's detailed work-out sample. It's excellent except that the excitation is sin instead of cos as the problem stated. It's always nice to learn how to solve same problem in different ways.

    If Laplace isn't allowed, I would have solved the zero-input-response (homogeneous problem with non-zero iv) and zero-state-response by finding h(t), then y(t)=x(t)*h(t) where * denotes convolution. h(t) is the impulse response of the ODE (nonhomogeneous part set to Dirac Delta) . h(t) can be found by finding the step response first then take a time derivative.

    Yes, we do love "Laplace transform":smile: partially because almost all continuous-time Linear Time Invariant systems (i.e. linear feedback systems) are analyzed in s domain, and z domain for digital systems. For simple 2-order systems, one would simply draw the poles and zeros on the s-plane with pencil and paper and get an idea how the system would behave without solving the differential equation.

    I didn’t realize the importance of Laplace Transform and Fourier Transform until I had to design commercial grade Phase-Lock-Loop, feedback amplifiers and filters at work. The most embarrassing thing is that I got an oscillator only when I was trying to build an amplifier:confused:. I actually had to review all the text I have learned and worked out many end chapter problems I skipped in school. Computer simulation was not as popular back then. Even with computer software available, it’s vital to know what is actually going on so that we don’t setup the model incorrectly and are able to tell if the simulated results make sense.

    Sorry, I digress but I wanted to stress to EE students that Laplace transform is extremely important in practical electrical engineering. I wish I realized that earlier.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook