Example

Let's solve the initial value problem y''+2ty-4y=1, y(0)=y'(0)=0.


  Clear[de,tde,newtde,Y,y]

Here's the differential equation:


  de=y''[t]+2 t y'[t]-4 y[t]==1

Here is the transformed differential equation:


  tde=LaplaceTransform[de,t,s]

Let's make use of the initial values:


  newtde=tde/.{y[0]->0,y'[0]->0}

This is a differential equation in Y[s]. To save you (and Mathematica) some grief, retype the DE interms of the Laplace transform Y[s].


  deinY=-4 Y[s]+s^2 Y[s]-2 Y[s]-2 s Y'[s]==1/s

Now solve the differential equation in Y[s].


  DSolve[deinY,Y[s],s];
  Y[s]:=Evaluate[Y[s]/.Flatten[%]]
  Y[s]

Before transforming back to get y(t), we must realize that the limit as s->Infinity of Y[s] is 0 if Y is the Laplace transform of an appropriate function. Check your text for such a theorem. In order for Lim{s->Infinity} Y[s] to be 0 we need C[1] to be 0 (do you see why?).

Now transform back to find y(t).


  y[t_]:=InverseLaplaceTransform[Y[s]/.C[1]->0,s,t]
  y[t]
  

Up to Solving Initial Value Problems with Polynomial Coefficients