# Initial Value Problems

Itnitial-value problems are solved by applying initial conditions to the general solution of the differential equation. Note that initial conditions are applied only to the general solution and not to the homogeneous solution y_h, even though it is y_h, that possesses all the arbitrary constants that must be evaluated. The only exception is when the general solution is the homogeneous solution; that is, when the differential equation under consideration is itself homogeneous.

Example 1. Solve y''+y'-2y=0 , y(0)=1, y'(0)=2.

This is gomogeneous differential equation. Characteristic equation is r^2+r-2=0 or (r+2)(r-1)=0 which has roots r_1=-2,\ r_2=1 .

So, general solution is y=c_1e^(-2x)+c_2e^x .

Thus, y'=-2c_1e^(-2x)+c_2e^x .

Applying initial consditions gives

{(y(0)=1=c_1e^(-2*0)+c_2e^0),(y'(0)=2=-2c_1e^(-2*0)+c_2e^0):}

Or

{(c_1+c_2=1),(-2c_1+c_2=2):}

Subtracting second equation from first gives 3c_1=-1 or c_1=-1/3 .

From first equation c_2=1-c_1=1-(-1/3)=4/3 .

So, solution is y=-1/3 e^(-2x)+4/3e^x .

Example 2. Solve y''+2y'+y=cos(t) , y(0)=3, y'(0)=0

First solve correspondint homogeneous equation y''+2y'+y=0 . Characteristic equation is r^2+2r+1=0 or (r+1)^2=0 which has roots r_1=-1, r_2=-1 .

There is one root of multiplicity 2, so solution of homogeneous equation y_h=c_1e^(-t)+c_2te^(-t) .

Once again, we don't apply initial conditions on this stage. We must first find general solution (in this case y_h+y_p ) and only then apply initial consditions.

To find particular solution use method of undetermined coefficients.

Assume that y_p=Acos(t)+Bsin(t) . Then y_p'=-Asin(t)+Bcos(t) and y_p''=-Acos(t)-Bsin(t) .

Plugging this into equation gives

-Acos(t)-Bsin(t)+2(-Asin(t)+Bcos(t))+Acos(t)+Bsin(t)=2Bcos(t)-2Asin(t) .

Equating like terms with cos(t) gives

{(2B=1),(-2A=0):}

Which has solution A=0, B=1/2 .

So, y_p=1/2 sin(t) .

Thus, general solution is y=y_h+y_p=c_1e^(-t)+c_2te^(-t)+1/2 sin(t) .

Now, we can use initial conditions.

For this find derivative of general solution: y'=-c_1e^(-t)+c_2e^(-t)-c_2te^(-t)+1/2 cos(t) .

So,

{(y(0)=3=c_1e^(-0)+c_2*0*e^(-0)+1/2 sin(0)),(y'(0)=0=-c_1e^(-0)+c_2e^(-0)-c_2*0*e^(-0)+1/2 cos(0)):}

Or

{(c_1=3),(-c_1+c_2=-1/2):}

Which has solution c_1=3,\ c_2=5/2 .

Finally, solution is y=3e^(-t)+5/2 t e^(-t)+1/2 sin(t) .