3.3.26.1 Algorithm for solving using Laplace transform for time varying ode
-- Input is first ode in y(t) with possible IC in form y(t0)=y0 
-- output is solution y(t) using Laplace transform. 
 
-- The first step is convert the ODE in y(t) to ODE in Y(s) using 
-- the relation L(t^n f(t) ) = -(1)^n d^n/ds^n( F(s) ) 
-- where F(s) is the Laplace of f(t). This is applied to each term in 
-- the original ode in y(t). 
 
-- Now we have an ODE in Y(s). This ode can be first order or higher 
-- order depending on the power on t. For example if the input 
-- is t^3*y(t)+y'(t)=0 then the ode in Y(s) will be 3rd order. 
 
-- Next step is to solve the ode in Y(s). Let us say the solution 
-- is Y(s)=.... This solution will have as many new constants as the 
-- order of the ode in Y(s) 
 
IF no IC are given THEN 
   Apply Laplace to the ODE and convert to ode in Y(s) 
   solve this ode in Y(s) 
   Apply inverse Laplace transform on solution Y(s). THis gives 
   y(t)=.... which is the final solution. 
ELSE -- IC is given as y(t0)=y0 
    IF t0=0 THEN 
        Apply Laplace to the ODE and convert to ode in Y(s) 
        solve this ode in Y(s) 
 
        LABEL L: 
 
        Apply inverse Laplace transform on Y(s) 
        now we have y(t)=.... with constants c_i in it     (*) 
        these constants c_i come from solving the ode in Y(s) 
        Apply IC to obtain equation   y0=.... with constants c_i in it. 
 
        IF there is more than one unknown c_i in the RHS then solve 
            for one of them and plug that into (*). This is final solution 
        ELSE 
            solve for c_1 from y0=.... c_1 .... and plugin into (*). 
        END IF 
    ELSE -- initial conditions not at zero, i.e. y(t0)=y0 and t0<>0 
         -- This applies also even if y0=0 or not. 
 
        Transform the original ode in y(t) such that IC is now 
        shifted to zero. 
 
        For example, if IC was y(1)=y0, then use transformation 
        tau=t-1. This gives new ode in time, but with y(0)=y0. 
 
        This is the one we will work with now. Not the orginal one. 
 
        Apply Laplace to this new ODE and convert to ode in Y(s) 
        solve this ode in Y(s) 
 
        GOTO LABEL L to find solution y(tau) 
 
        convert solution back to t, using tau=t-t0 
    END IF 
END IF