User:Egm4313.s12.team8.koester/R5.5

Question
1. Show that cos(7x) and sin(7x) are linearly independent using the Wronskian and Gramian.

2. Find 2 equations for the 2 unknowns M and N and solve for M and N.

3. Find the overall solution that corresponds to the initial condition.

Plot the solution over 3 periods.

Solution
1) Show that cos(7x) and sin(7x) are linearly independent using the Wronskian and Gramian.

The Wronskian is defined as:

$$ \displaystyle W(f,g):=det\begin{bmatrix} f &g \\ f'&g' \end{bmatrix}=fg'-gf' $$

The Wronskian proves linear independence if:

$$ \displaystyle W(f,g)\neq 0 $$

Filling in the formula:

$$ \displaystyle f= cos(7x) $$

$$ \displaystyle g= sin(7x) $$

$$ \displaystyle f'=-7sin(7x) $$

$$ \displaystyle g'=7cos(7x) $$

$$ \displaystyle W(f,g):=det\begin{bmatrix} cos(7x) &sin(7x) \\ -7sin(7x)&7cos(7x) \end{bmatrix}= cos(7x)*7cos(7x)-sin(7x)*(-7sin(7x)) $$

$$ \displaystyle W(f,g):= 7cos^{2}(7x)+7sin^{2}(7x)\neq 0 $$

Since the Wronskian does not equal 0 this proves that these two equations are linearly independent.

The Gramian is defined as:

$$\displaystyle \Gamma (f,g):=det\begin{bmatrix}  & \\  & \end{bmatrix} $$

Where the notation is:

$$\displaystyle :=\int_{a}^{b}f(x)g(x)dx $$

The Gramian proves linear independence if:

$$ \displaystyle \Gamma (f,g)\neq 0 $$

So for this problem and integrating over one period:

$$\displaystyle :=\int_{0}^{\frac{2\pi}{7}}cos(7x)cos(7x)dx $$

This integral must be solved using u substitution and the following equations:

$$ \displaystyle u=7x $$

$$ \displaystyle du=7dx $$

The integral then reduces to:

$$\displaystyle :=\frac{1}{7}\int_{0}^{2\pi}cos^{2}(u)dx= \frac{\pi}{7}$$

$$\displaystyle :=\int_{0}^{\frac{2\pi}{7}}sin(7x)sin(7x)dx $$

Which using the same u substitution reduces to:

$$\displaystyle :=\frac{1}{7}\int_{0}^{2\pi}sin^{2}(u)dx= \frac{\pi}{7}$$

$$\displaystyle := :=\int_{0}^{\frac{2\pi}{7}}sin(7x)cos(7x)dx $$

Due to the orthogonality of the trigonometric system and the fact that the coefficients in the sine and cosine terms are equal both of these integrals will equal 0.

$$\displaystyle := :=\int_{0}^{\frac{2\pi}{7}}sin(7x)cos(7x)dx=0 $$

$$\displaystyle \Gamma (f,g):=det\begin{bmatrix} \frac{\pi}{7} &0 \\ 0 & \frac{\pi}{7} \end{bmatrix}= \frac{\pi^{2}}{49} \neq 0$$

So once again these two equations are proven linearly independent.

2) Find 2 equations for the 2 unknowns M and N and solve for M and N.

Given the followin L2-ODE-CC:

$$\displaystyle y^{''}-3y^{'}-10y=3cos(7x) $$

$$\displaystyle y_{p}=Mcos(7x)+ Nsin(7x) $$

$$\displaystyle y'_{p}=-7Msin(7x)+ 7Ncos(7x) $$

$$\displaystyle y''_{p}=-49Mcos(7x)- 49Nsin(7x) $$

Plugging these back into the original equation one obtains:

$$\displaystyle -49Mcos(7x)- 49Nsin(7x)+ 21Msin(7x)- 21Ncos(7x)- 10Mcos(7x) -10Nsin(7x)= 3cos(7x) $$

Collecting like terms:

$$\displaystyle -59Mcos(7x)- 59Nsin(7x)+ 21Msin(7x)- 21Ncos(7x)= 3cos(7x) $$

Equating coefficients the following two equations are found:

$$\displaystyle -59M -21N=3 $$

$$\displaystyle -59N +21M=0 $$

Solving these equations:

$$\displaystyle M=\frac{-177}{3922} $$

$$\displaystyle N=\frac{-63}{3922} $$

Therefore the particular solution is:

$$\displaystyle y_{p}(x)=\frac{-177}{3922}cos(7x)+ \frac{-63}{3922}sin(7x) $$

3) Find the overall solution that corresponds to the initial condition:

$$ \displaystyle y(0)=1 $$

$$ \displaystyle y'(0)=0 $$

Now to solve for the homogeneous solution:

$$\displaystyle y^{''}-3y^{'}-10y=3cos(7x) $$

This equation follow the form:

$$\displaystyle y^{''}+ay^{'}+by=0 $$

So:

$$\displaystyle a^{2}-4b=9+40=49 $$

Since this is greater than 0 we have Case I, two distinct real roots.

$$\displaystyle y_{h}(x)=c_{1}e^{\lambda_{1}x}+ c_{2}e^{\lambda_{2}x} $$

$$\displaystyle \lambda_{1}=\frac{3+7}{2}=5 $$

$$\displaystyle \lambda_{1}=\frac{3-7}{2}=-2 $$

$$\displaystyle y_{h}(x)=c_{1}e^{5x}+ c_{2}e^{-2x} $$

Using the initial conditions and the first derivative:

$$\displaystyle y_{h}'(x)=5c_{1}e^{5x}- 2c_{2}e^{-2x} $$

$$\displaystyle y(0)=1=c_{1}+c_{2}=1 $$

$$\displaystyle y'(0)=0=5c_{1}-2c_{2} $$

Solving this system of equations:

$$\displaystyle c_{1}=\frac{2}{7} $$

$$\displaystyle c_{2}=\frac{5}{7} $$

$$\displaystyle y_{h}(x)=\frac{2}{7}e^{5x}+ \frac{5}{7}e^{-2x} $$

$$\displaystyle y(x)=y_{p}+y_{h} $$

$$\displaystyle y(x)= \frac{2}{7}e^{5x}+ \frac{5}{7}e^{-2x}+ \frac{-177}{3922}cos(7x)+ \frac{-63}{3922}sin(7x) $$

Plot
Solution plotted over 3 periods.

$$\displaystyle P=\frac{2\pi}{7}, 3P=\frac{6\pi}{7} $$

Matlab code:

>> x=linspace(0,(6*pi)/7);

>> y=(2/7).*exp(5.*x)+(5/7).*exp(-2.*x)-(177/3922).*cos(7.*x)-(63/3922).*sin(7.*x);

>> plot(x,y)