User:Egm4313.s12.team8.koester/R2.9

Given:
$$ \displaystyle \lambda^{2}+4\lambda+13=0  $$

Initial Conditions:

$$ \displaystyle y(0)=1   $$    and    $$ \displaystyle  {y}'(0)=0   $$

No excitation:

$$ \displaystyle r(x)=0   $$

Solution:
Written in standard form:

$$ \displaystyle {y}''+4 {y}'+13 y=0  $$

The equation follows the characteristic equation:

$$ \displaystyle {y}''+a {y}'+b y=0  $$

Therefore:

$$ \displaystyle   a=4   $$  and  $$ \displaystyle    b=13   $$

Calculating the discriminant, we can then decide which case this problem follows.

$$ \displaystyle   a^{2}-4b =  4^{2}-4(13) = 16-52 = -36   $$

Since the discriminant is less than 0, the problem will follow Case III, complex conjugate roots.

The general solution will then take the form of:

$$ \displaystyle  y=e^{-ax/2}(Acos(wx)+Bsin(wx))  $$

Where:

$$ \displaystyle   w= \sqrt{b-\frac{1}{4}a^{2}}    $$    and    $$   \displaystyle   a=4   $$ (as previously stated)

Therefore:

$$ \displaystyle   w= \sqrt{13-\frac{1}{4}(4)^{2}} =  \sqrt{9}  = 3 $$

We can now substitute these values back into the general solution, obtaining:

$$ \displaystyle  y=e^{-2x}(Acos(3x)+Bsin(3x))  $$

We now take the general solution's derivative.

$$ \displaystyle  y(x)=e^{-2x}(Acos(3x)+Bsin(3x))  $$

$$ \displaystyle  {y}'(x)=e^{-2x}(-3Asin(3x)+3Bcos(3x))-2e^{-2x}(Acos(3x)+Bsin(3x)) $$

We can now use the given initial conditions to solve for the unknown constants A and B.

$$ \displaystyle  y(0)=1,  {y}'(0)=0   $$

$$ \displaystyle  y(0)=e^{-2(0)}(Acos(3(0))+Bsin(3(0)))=1  $$

$$ \displaystyle  {y}'(0)=e^{-2(0)}(-3Asin(3(0))+3Bcos(3(0)))-2e^{-2(0)}(Acos(3(0))+Bsin(3(0)))=0 $$

Reducing to the following system of equations:

$$ \displaystyle  A=1   $$

$$ \displaystyle  3B-2A=0 $$

Solving this system, the constants A and B can be found as:

$$ \displaystyle  A=1, B=\frac{2}{3} $$

Replacing these constants back into the equation, we can obtain the final solution:

Figures:
Graph of Solution to 2.9

Matlab code:

>> x=linspace(-3,2);

>> f= exp(-2*x).*(cos(3*x)+.666*sin(3*x))

>> plot(x,f)

>> xlabel('x')

>> ylabel('y')



Graph of 2.9, 2.6, and 2.1

a) from R2.9 (blue) $$ \displaystyle y(x)=e^{-2x}(cos(3x)+\frac{2}{3}sin(3x))   $$

b) from R2.6 (green) $$ \displaystyle y(x)=e^{-3x}+3xe^{-3x}      $$

c) from R2.1 (red) $$ \displaystyle   y(x)=\frac{5}{7}e^{-2x}+\frac{2}{7}e^{5x}     $$

Matlab code:

x = linspace(-3,2);

f = exp(-2*x).*(cos(3*x)+2/3*sin(3*x)); g = exp(-3*x) + 3 * x .* exp(-3*x); h = 5/7 * exp(-2*x) + 2/7*exp(5*x);

fl=sign(f) .* log(abs(f) + 1); gl=sign(g) .* log(abs(g) + 1); hl=sign(h) .* log(abs(h) + 1);

plot(x,f,x,g,x,h) xlabel('x') ylabel('y')



plot(x,fl,x,gl,x,hl) xlabel('x') ylabel('sign(y) * log(abs(y) + 1)')



Written by: Egm4313.s12.team8.koester 19:08, 7 February 2012 (UTC)