# University of Florida/Egm4313/s12.team11.R5

Report 5

Intermediate Engineering Analysis
Section 7566
Team 11
Due date: March 30, 2012.

## R5.1

#### Problem Statement

Given: Find ${\displaystyle R_{c}\!}$  for the following series:

1. ${\displaystyle r(x)=\sum _{k=0}^{\infty }(k+1)kx^{k}\!}$
2. ${\displaystyle r(x)=\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{\gamma ^{k}}}x^{2k}\!}$

Find ${\displaystyle R_{c}\!}$  for the Taylor series of

3. ${\displaystyle sin(x)\!}$  at ${\displaystyle x=0\!}$

4. ${\displaystyle log(1+x)\!}$  at ${\displaystyle x=0\!}$

5. ${\displaystyle log(1+x)\!}$  at ${\displaystyle x=1\!}$

#### Solution

The radius of convergence ${\displaystyle R_{c}\!}$  is defined as

${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {d_{k+1}}{d_{k}}}|]^{-1}\!}$

1. ${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {(k+2)(k+1)}{(k+1)(k)}}|]^{-1}\!}$
${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {(k+2)}{(k)}}|]^{-1}\!}$
${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {k(1+{\frac {2}{k}})}{k}}|]^{-1}\!}$
${\displaystyle R_{c}=[\lim _{k\to \infty }|1+{\frac {2}{k}}|]^{-1}\!}$
${\displaystyle R_{c}=[1+0]^{-1}\!}$

                                                          ${\displaystyle R_{c}=1\!}$

2. ${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {\frac {(-1)^{k+1}}{\gamma ^{k+1}}}{\frac {(-1)^{k}}{\gamma ^{k}}}}|]^{-1}\!}$
${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {-1}{\gamma }}|]^{-1}\!}$
${\displaystyle R_{c}=[\lim _{k\to \infty }{\frac {1}{\gamma }}]^{-1}\!}$
${\displaystyle R_{c}=[{\frac {1}{\gamma }}]^{-1}\!}$
${\displaystyle R_{c}=\gamma \!}$

However, in this problem, the series ${\displaystyle x\!}$  term is ${\displaystyle x^{2k}\!}$  not ${\displaystyle x^{k}\!}$ , as is the general form.
Therefore, this implies:

${\displaystyle |x^{2}|=\gamma \!}$
${\displaystyle |x|={\sqrt {\gamma }}\!}$

                                                        ${\displaystyle R_{c}={\sqrt {\gamma }}\!}$

3. The Taylor series for ${\displaystyle sin(x)\!}$  is expressed as ${\displaystyle sin(x)=\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{(2k+1)!}}x^{2k+1}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {(-1)^{k+1}}{(2(k+1)+1)!}}x^{2(k+1)+1}}{{\frac {(-1)^{k}}{(2k+1)!}}x^{2k+1}}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {1}{(2k+3)!}}x^{2k+3}}{{\frac {1}{(2k+1)!}}x^{2k+1}}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {1}{(2k+3)}}x^{3}}{x}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {1}{(2k+3)}}x^{2}\!}$

Therefore: ${\displaystyle R_{c}=[\lim _{k\to \infty }{\frac {1}{(2k+3)}}]^{-1}\!}$

                                                           ${\displaystyle R_{c}=\infty \!}$

4. The Taylor series for ${\displaystyle log(1+x)\!}$  at ${\displaystyle x=0\!}$  is expressed as ${\displaystyle log(1+x)=\sum _{k=1}^{\infty }{\frac {(-1)^{k+1}}{k}}x^{k}\!}$

${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {\frac {(-1)^{k+2}}{k+1}}{\frac {(-1)^{k+1}}{k}}}|]^{-1}\!}$

${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {\frac {(-1)}{k+1}}{\frac {(1)}{k}}}|]^{-1}\!}$

${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {\frac {(-1)}{k(1+{\frac {1}{k}})}}{\frac {1}{k}}}|]^{-1}\!}$

${\displaystyle R_{c}=[\lim _{k\to \infty }|{\frac {(-1)}{(1+{\frac {1}{k}})}}|]^{-1}\!}$

${\displaystyle R_{c}=[1/1]^{-1}\!}$

                                                             ${\displaystyle R_{c}=1\!}$


5. The Taylor series for ${\displaystyle log(1+x)\!}$  at ${\displaystyle x=1\!}$  is expressed as ${\displaystyle log(1+x)=log(2)+\sum _{k=1}^{\infty }{\frac {(-1)^{k+1}}{2^{k}k}}(x-1)^{k}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {(-1)^{k+2}}{2^{k+1}(k+1)}}(x-1)^{k+1}}{{\frac {(-1)^{k+1}}{2^{k}k}}(x-1)^{k}}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {(-1)^{2}}{2(k+1)}}(x-1)}{\frac {1}{k}}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {1}{2k(1+{\frac {1}{k}})}}(x-1)}{\frac {1}{k}}}\!}$

${\displaystyle \lim _{k\to \infty }{\frac {{\frac {1}{2(1+{\frac {1}{k}})}}(x-1)}{1}}\!}$

${\displaystyle {\frac {1}{2}}(x-1)\!}$

For convergence: ${\displaystyle {\frac {1}{2}}(x-1)<1\!}$

${\displaystyle x-1<2\!}$

${\displaystyle x<3\!}$

Therefore,

                                                             ${\displaystyle R_{c}=3\!}$


## R5.2

Solved by: Andrea Vargas

### Problem Statement

Part 1:Determine whether the following are linearly independent using the Wronskian

Part 2: Determine whether the following are linearly independent using the Gramian

### Solution

#### Part 1

Using the Wronskian we check for linear independence.

We know from (1) and (2) in 7-35 that if
${\displaystyle W=\det {\begin{bmatrix}f&g\\f'&g'\end{bmatrix}}=fg'-gf'\neq 0\!}$
Then the functions are linearly independent.

##### Part 1.1

${\displaystyle f(x)=x^{2}\!}$
${\displaystyle g(x)=x^{4}\!}$

Taking the derivatives of each function:

${\displaystyle f'(x)=2x\!}$
${\displaystyle g'(x)=4x^{3}\!}$

${\displaystyle W={\begin{bmatrix}x^{2}&x^{4}\\2x&4x^{3}\end{bmatrix}}=4x^{5}-2x^{5}=2x^{5}\neq 0\!}$

                                          ${\displaystyle \therefore \!}$  f(x) and g(x) are linearly independent

##### Part 1.2

${\displaystyle f(x)=\cos(x)\!}$
${\displaystyle g(x)=\sin(3x)\!}$

Taking the derivatives of each function:

${\displaystyle f'(x)=-\sin(x)\!}$
${\displaystyle g'(x)=3\cos(3x)\!}$

${\displaystyle W={\begin{bmatrix}\cos(x)&\sin(3x)\\-\sin(x)&3\cos(3x)\end{bmatrix}}=3\cos(x)\cos(3x)+\sin(3x)\sin(x)=\neq 0\!}$

                                           ${\displaystyle \therefore \!}$  f(x) and g(x) are linearly independent


#### Part 2

Using the Gramian we check for linear independence.
We know from the notes in (1) 7-34 that:
${\displaystyle \langle f,g\rangle :=\int _{a}^{b}=f(x)g(x)\!}$

and that the Gramian is defined as: ${\displaystyle \Gamma (f,g)=det{\begin{bmatrix}\langle f,f\rangle &\langle f,g\rangle \\\langle g,f\rangle &\langle g,g\rangle \end{bmatrix}}\!}$

Then f,g are linearly independent if ${\displaystyle \Gamma (f,g)\neq 0\!}$

##### Part 2.1

${\displaystyle f(x)=x^{2}\!}$
${\displaystyle g(x)=x^{4}\!}$

Taking scalar products:
${\displaystyle \langle f,f\rangle :=\int _{-1}^{1}=f(x)f(x)=x^{2}*x^{2}=\int _{-1}^{1}=x^{4}=\left[{\frac {x^{5}}{5}}\right]_{-1}^{1}={\frac {2}{5}}\!}$
${\displaystyle \langle f,g\rangle =\langle g,f\rangle :=\int _{-1}^{1}=f(x)g(x)=x^{2}*x^{4}=\int _{-1}^{1}=x^{6}=\left[{\frac {x^{7}}{7}}\right]_{-1}^{1}={\frac {2}{7}}\!}$
${\displaystyle \langle g,g\rangle :=\int _{-1}^{1}=g(x)g(x)=x^{4}*x^{4}=\int _{-1}^{1}=x^{8}=\left[{\frac {x^{9}}{9}}\right]_{-1}^{1}={\frac {2}{9}}\!}$

${\displaystyle \Gamma (f,g)=\det {\begin{bmatrix}{\frac {2}{5}}&{\frac {2}{7}}\\&\\{\frac {2}{7}}&{\frac {2}{9}}\end{bmatrix}}=0.08888-0.0816326531\neq 0\!}$

                                          ${\displaystyle \therefore \!}$  f(x) and g(x) are linearly independent

##### Part 2.2

${\displaystyle f(x)=\cos(x)\!}$
${\displaystyle g(x)=\sin(3x)\!}$

Taking scalar products:
${\displaystyle \langle f,f\rangle :=\int _{-1}^{1}=f(x)f(x)=\int _{-1}^{1}=\cos ^{2}(x)dx\!}$
We can use the trig identity for power reduction ${\displaystyle \cos ^{2}(x)={\frac {1}{2}}\cos(2x)+{\frac {1}{2}}\!}$
Then we have,
${\displaystyle \int _{-1}^{1}{\frac {1}{2}}\cos(2x)+{\frac {1}{2}}dx=\left[{\frac {1}{4}}\sin(2x)+{\frac {1}{2}}x\right]_{-1}^{1}\!}$
${\displaystyle =0.7273243567-(-0.7273243567)=1.454648713\!}$

${\displaystyle \langle f,g\rangle =\langle g,f\rangle :=\int _{-1}^{1}f(x)g(x)dx\!}$
${\displaystyle =\int _{-1}^{1}\sin(3x)\cos(x)dx=\left[{\frac {1}{8}}(-2\cos(2x)-\cos(4x))\right]_{-1}^{1}\!}$
${\displaystyle =0.185742-0.185742=0\!}$

${\displaystyle \langle g,g\rangle :=\int _{-1}^{1}g(x)g(x)dx=\int _{-1}^{1}\sin(3x)\sin(3x)dx\!}$
${\displaystyle ={\frac {1}{2}}\int _{-1}^{1}1-\cos(6x)dx=\left[{\frac {1}{2}}(x-{\frac {1}{6}}\sin(6x))\right]_{-1}^{1}\!}$
${\displaystyle =0.523285+0.523285=1.04656925\!}$

${\displaystyle \Gamma (f,g)=\det {\begin{bmatrix}1.454648713&0\\0&1.04656925\end{bmatrix}}=1.522390612\neq 0\!}$

                                          ${\displaystyle \therefore \!}$  f(x) and g(x) are linearly independent


### Conclusion

By both methods (the Wronskian and the Gramian) we obtain the same results.

## R5.3

### Problem Statement

Verify using the Gramian that the following two vectors are linearly independent.

${\displaystyle \mathbf {b_{1}} =2\mathbf {e_{1}} +7\mathbf {e_{2}} \!}$
${\displaystyle \mathbf {b_{1}} =1.5\mathbf {e_{1}} +3\mathbf {e_{2}} \!}$

### Solution

${\displaystyle \Gamma (f,g)=det{\begin{bmatrix}\langle \mathbf {b1} ,\mathbf {b1} \rangle &\langle \mathbf {b1} ,\mathbf {b2} \rangle \\\langle \mathbf {b2} ,\mathbf {b1} \rangle &\langle \mathbf {b2} ,\mathbf {b2} \rangle \end{bmatrix}}\!}$

We know from (3) 8-9 that:
${\displaystyle \langle \mathbf {b1} ,\mathbf {b2} \rangle =\mathbf {b1} \cdot \mathbf {b2}
\!}$

We obtain,
${\displaystyle \langle \mathbf {b1} ,\mathbf {b1} \rangle =(2)(2)+(7)(7)=4+49=53\!}$
${\displaystyle \langle \mathbf {b1} ,\mathbf {b2} \rangle =\langle \mathbf {b2} ,\mathbf {b1} \rangle =(1.5)(2)+(7)(3)=3+21=24\!}$  ${\displaystyle \langle \mathbf {b2} ,\mathbf {b2} \rangle =(1.5)(1.5)+(3)(3)=2.25+9=11.25\!}$

Then,
${\displaystyle \Gamma (f,g)=det{\begin{bmatrix}53&24\\24&11.25\end{bmatrix}}=596.25-576=20.25\neq 0\!}$

                                           ${\displaystyle \therefore \!}$  b_1 and b_2 are linearly independent


## R5.4

#### Problem Statement

Show that ${\displaystyle y_{p}(x)=\sum _{i=0}^{n}y_{p,i}(x)\!}$  is indeed the overall particular solution of the L2-ODE-VC ${\displaystyle y''+p(x)y'+q(x)y=r(x)\!}$  with the excitation ${\displaystyle r(x)=r_{1}(x)+r_{2}(x)+...+r_{n}(x)=\sum _{i=0}^{n}r_{i}(x)\!}$ .

Discuss the choice of ${\displaystyle y_{p}(x)\!}$  in the above table e.g., for ${\displaystyle r(x)=k\cos \omega x\!}$  why would you need to have both ${\displaystyle \cos \omega x\!}$  and ${\displaystyle \sin \omega x\!}$  in ${\displaystyle y_{p}(x)\!}$  ?

#### Solution

Because the ODE is a linear equation in y and its derivatives with respect to x, the superposition principle can be applied:

${\displaystyle r_{1}(x)\!}$  is a specific excitation with known form of ${\displaystyle y_{p1}(x)\!}$  and ${\displaystyle r_{2}(x)\!}$  is a specific excitation with known form of ${\displaystyle y_{p2}(x)\!}$

${\displaystyle +{\begin{cases}&{\text{ }}y_{p1}''+p(x)y_{p1}'+q(x)y_{p1}=r_{1}(x)\\&{\text{ }}y_{p2}''+p(x)y_{p2}'+q(x)y_{p2}=r_{2}(x)\end{cases}}\!}$

becomes

${\displaystyle (y_{p1}+y_{p2})''+p(x)(y_{p1}+y_{p2})'+q(x)(y_{p1}+y_{p2})=r_{1}(x)+r_{2}(x)\!}$

proving that

${\displaystyle y_{p}(x)=\sum _{i=0}^{n}y_{p,i}(x)\!}$  is indeed the overall particular solution of the L2-ODE-VC ${\displaystyle y''+p(x)y'+q(x)y=r(x)\!}$  with the excitation ${\displaystyle r(x)=\sum _{i=0}^{n}r_{i}(x)\!}$

According to Fourier Theorem periodic functions can be represented as infinite series in terms of cosines and sines:

${\displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }[a_{n}\cos \omega x+b_{n}\sin \omega x]\!}$

where the coefficients ${\displaystyle a_{0},a_{n},b_{n}\!}$  are the Fourier coefficients calculated using Euler formulas.

So even though the system is being excited by functions like ${\displaystyle r(x)=k\cos \omega x\!}$  the particular solution would still include both ${\displaystyle \sin \omega x\!}$  and ${\displaystyle \cos \omega x\!}$  in ${\displaystyle y_{p}(x)\!}$  because the excitation is a periodic function that can be represented as the Fourier infinite series in terms of both ${\displaystyle \sin \omega x\!}$  and ${\displaystyle \cos \omega x\!}$  times the Fourier coefficients

## R5.5

### Part 1

#### Problem Statement

Show that ${\displaystyle cos(7x)}$  and ${\displaystyle sin(7x)}$  are linearly independant using the Wronskian and the Gramain (integrate over 1 period)

#### Solution

${\displaystyle f=cos(7x),g=sin(7x)}$
One period of ${\displaystyle 7x=\pi /7}$
Wronskian of f and g
${\displaystyle W(f,g)=det{\begin{bmatrix}f&g\\f'&g'\end{bmatrix}}}$

Plugging in values for ${\displaystyle f,f',g,g';}$
${\displaystyle W(f,g)=det{\begin{bmatrix}cos(7x)&sin(7x)\\-sin(7x)&cos(7x)\end{bmatrix}}}$  ${\displaystyle =7cos^{2}(7x)+7sin^{2}(7x)}$
${\displaystyle =7[cos^{2}(7x)+sin^{2}(7x)]}$
${\displaystyle =7[1]}$

 They are linearly Independant using the Wronskian.


${\displaystyle =\int _{a}^{b}f(x)g(x)dx}$
${\displaystyle \Gamma (f,g)=det{\begin{bmatrix}&\\&\end{bmatrix}}}$
${\displaystyle \int _{0}^{\pi /7}cos^{2}(7x)dx=\pi /14}$
${\displaystyle \int _{0}^{\pi /7}sin^{2}(7x)dx=\pi /14}$
${\displaystyle \int _{0}^{\pi /7}cos(7x)*sin(7x)dx=0}$
${\displaystyle \Gamma (f,g)=det{\begin{bmatrix}\pi /14&0\\0&\pi /14\end{bmatrix}}}$
${\displaystyle \Gamma (f,g)=\pi ^{2}/49}$

 They are linearly Independent using the Gramain.


#### Problem Statement

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

#### Solution

${\displaystyle y_{p}(x)=Mcos7x+Nsin7x}$
${\displaystyle y'_{p}(x)=-M7sin7x+N7cos7x}$
${\displaystyle y''_{p}(x)=-M7^{2}cos7x-N7^{2}sin7x}$
Plugging these values into the equation given (${\displaystyle y''-3y'-10y=3cos7x}$ ) yields;
${\displaystyle -M7^{2}cos7x-N7^{2}sin7x-3(-M7sin7x+N7cos7x)-10(Mcos7x+Nsin7x)=3cos7x}$
Simplifying and the equating the coefficients relating sin and cos results in;
${\displaystyle -59M-21N=3}$
${\displaystyle -59N+21M=0}$
Solving for M and N results in;

  ${\displaystyle M=-177/3922,N=-63/3922}$

#### Problem Statement

Find the overall solution ${\displaystyle y(x)}$  that corresponds to the initial conditions ${\displaystyle y(0)=1,y'(0)=0}$ . Plot over three periods.

#### Solution

From before, one period ${\displaystyle =\pi /7}$  so therefore, three periods is ${\displaystyle 3\pi /7.}$
Using the roots given in the notes ${\displaystyle \lambda _{1}=-2,\lambda _{2}=5}$ , the homogenous solution becomes;
${\displaystyle y_{h}(x)=c_{1}e^{-2x}+c_{2}e^{5x}}$
Using initial condtion ${\displaystyle y(0)=1}$ ;
${\displaystyle 1=c_{1}+c_{2}}$
${\displaystyle y'_{h}(x)=-2c_{1}e^{-2x}+5c_{2}e^{5x}}$
with ${\displaystyle y'(0)=0}$
${\displaystyle 0=-2c_{1}+5c_{2}}$
Solving for the constants;
${\displaystyle c_{1}=5/7,c_{2}=2/7}$
${\displaystyle y_{h}(x)=5/7e^{-2x}+2/7e^{5x}}$
Using the ${\displaystyle y_{p}(x)}$  found in the last part;
${\displaystyle y=y_{h}+y_{p}}$

 ${\displaystyle y=5/7e^{-2x}+2/7e^{5x}-177/3922cos7x-63/3922sin7x}$


## R5.6

solved by Luca Imponenti

#### Problem Statement

Complete the solution to the following problem

${\displaystyle y''+4y'+13y=2e^{-2x}cos(3x)\!}$

where

${\displaystyle y_{h}=e^{-2x}[Acos(3x)+Bsin(3x)]\!}$

and

${\displaystyle y_{p}=xe^{-2x}[Mcos(3x)+Nsin(3x)]\!}$

Find the overall solution ${\displaystyle y(x)\!}$  corresponds to the initial condition:

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

Plot the solution over 3 periods.

#### Particular Solution

Taking the derivatives of the particular solution ${\displaystyle y_{p}(x)\!}$

${\displaystyle y_{p}=xe^{-2x}[Mcos(3x)+Nsin(3x)]\!}$

${\displaystyle y'_{p}=e^{-2x}[sin(3x)(N-2Nx-3Mx)+cos(3x)(3Nx+M-2Mx)]\!}$

${\displaystyle y''_{p}=e^{-2x}[sin(3x)(12Mx-6M-5Nx-4N)+cos(3x)(6N-5Mx-4M-12Nx)]\!}$

Plugging these into the ODE yields

${\displaystyle sin(3x)(6M-12Mx+5Nx+4N)+cos(3x)(5Mx+4M+12Nx-6N)+\!}$  ${\displaystyle 4[sin(3x)(N-2Nx-3Mx)+cos(3x)(3Nx+M-2Mx)]+}$  ${\displaystyle 13x[Mcos(3x)+Nsin(3x)]=2cos(3x)\!}$

Equating like terms allows us to solve for M and N

${\displaystyle sin(3x)[(12Mx-6M-5Nx-4N)+4(N-2Nx-3Mx)+13Nx]=0\!}$

${\displaystyle cos(3x)[(6N-5Mx-4M-12Nx)+4(3Nx+M-2Mx)+13Mx]=2cos(3x)\!}$

${\displaystyle -6M=0\!}$

${\displaystyle 6N=2\!}$

${\displaystyle M=0\ ,\ N={\frac {1}{3}}\!}$

So the particular solution is

${\displaystyle y_{p}={\frac {1}{3}}xe^{-2x}sin(3x)\!}$

#### Overall Solution

The overall solution in the sum of the homogeneous and particular solutions

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

${\displaystyle y(x)=e^{-2x}[Acos(3x)+Bsin(3x)]+{\frac {1}{3}}xe^{-2x}sin(3x)\!}$

To find A and B we apply the initial conditions

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

${\displaystyle y(0)=1=A\!}$

Taking the derivative

${\displaystyle y'(x)={\frac {d}{dx}}[e^{-2x}[cos(3x)+Bsin(3x)]+{\frac {1}{3}}xe^{-2x}sin(3x)]\!}$

${\displaystyle y'(x)=e^{-2x}[(3B+x-2)cos(3x)-(2B+{\frac {2}{3}}x+{\frac {8}{3}})sin(3x)]\!}$

${\displaystyle y'(0)=0=3B-2\!}$

${\displaystyle B={\frac {2}{3}}\!}$

Giving us the overall solution

   ${\displaystyle y(x)=e^{-2x}[cos(3x)+{\frac {2}{3}}sin(3x)+{\frac {1}{3}}xsin(3x)]\!}$


#### Plot

The period for ${\displaystyle cos(3x)\ ,\ sin(3x)\!}$  is ${\displaystyle {\frac {2\pi }{3}}}$

Plotting the solution ${\displaystyle y(x)\!}$  over 3 periods yields

## R5.7

Solved by Daniel Suh

### Problem Statement

${\displaystyle v=4e_{1}+2e_{2}=c_{1}b_{1}+c{2}b_{2}\!}$

${\displaystyle b_{1}=2e_{1}+7e_{2}\!}$

${\displaystyle b_{2}=1.5e_{1}+3e_{2}\!}$

1. Find the components ${\displaystyle c_{1},c_{2}\!}$  using the Gram matrix.
2. Verify the result by using ${\displaystyle b_{1}\!}$  and ${\displaystyle b_{2}\!}$ , and rely on the non-zero determinant matrix of ${\displaystyle b_{1}\!}$  and ${\displaystyle b_{2}\!}$  relative to the bases of ${\displaystyle e_{1}\!}$  and ${\displaystyle e_{2}\!}$ .

### Part 1 Solution

#### Gram Matrix

${\displaystyle T(b_{1},b_{2})={\begin{bmatrix}&\\&\end{bmatrix}}}$

${\displaystyle =\!}$
Thus,

${\displaystyle ==<(2)(2)+(7)(7)>=53\!}$

${\displaystyle ==<(1.5)(1.5)+(3)(3)>=11.25\!}$

${\displaystyle ===<(2)(1.5)+(7)(3)>=24\!}$

${\displaystyle T(b_{1},b_{2})={\begin{bmatrix}53&24\\24&11.25\end{bmatrix}}}$

${\displaystyle \Gamma =det[T]=(53)(11.25)-(24)(24)=20.25\!}$

#### Defining c

Define: ${\displaystyle c={\begin{bmatrix}c_{1}\\c_{2}\end{bmatrix}}}$
${\displaystyle d={\begin{bmatrix}\\\end{bmatrix}}={\begin{bmatrix}d_{1}\\d_{2}\end{bmatrix}}\!}$

If ${\displaystyle \Gamma \neq 0\!}$ , then ${\displaystyle \Gamma ^{-1}\!}$  exists

${\displaystyle c=\Gamma ^{-1}d\!}$

#### Finding c

${\displaystyle \Gamma =20.25\neq 0\!}$  thus, ${\displaystyle \Gamma ^{-1}\!}$ exists

${\displaystyle d={\begin{bmatrix}d_{1}\\d_{2}\end{bmatrix}}={\begin{bmatrix}(2)(4)+(7)(2)\\(1.5)(4)+(3)(2)\end{bmatrix}}={\begin{bmatrix}22\\12\end{bmatrix}}\!}$

${\displaystyle {\begin{bmatrix}c_{1}\\c_{2}\end{bmatrix}}={\begin{bmatrix}53&24\\24&11.25\end{bmatrix}}^{-1}{\begin{bmatrix}22\\12\end{bmatrix}}\!}$

                                                     ${\displaystyle {\begin{bmatrix}c_{1}\\c_{2}\end{bmatrix}}={\begin{bmatrix}-2\\5.33\end{bmatrix}}\!}$

### Part 2 Solution

${\displaystyle v=4e_{1}+2e_{2}\equiv c_{1}b_{1}+c_{2}b_{2}\!}$

${\displaystyle c_{1}b_{1}+c_{2}b_{2}=(-2)(2e_{1}+7e_{2})+(5.33)(1.5e_{1}+3e_{2})\!}$

${\displaystyle c_{1}b_{1}+c_{2}b_{2}=-4e_{1}-14e_{2}+8e_{1}+16e_{2}\!}$

${\displaystyle c_{1}b_{1}+c_{2}b_{2}=4e_{1}+2e_{2}\!}$

${\displaystyle v=4e_{1}+2e_{2}\equiv c_{1}b_{1}+c_{2}b_{2}\!}$

                                                     ${\displaystyle \therefore \!}$  solution is correct


## R5.8

#### Problem Statement

Find the integral

${\displaystyle \int x^{n}log(1+x)dx\!}$  for ${\displaystyle n=0\!}$  and ${\displaystyle n=1\!}$

Using integration by parts, and then with the help of of

General Binomial Theorem

${\displaystyle (x+y)^{n}=\sum _{k=0}^{n}{\binom {n}{k}}x^{n-k}y^{k}\!}$

#### Solution

For ${\displaystyle n=0\!}$ :

${\displaystyle \int x^{0}log(1+x)dx=\int log(1+x)dx\!}$

For substitution by parts, ${\displaystyle u=log(1+x),du={\frac {1}{1+x}},dv=dx,v=x\!}$

${\displaystyle \int log(1+x)dx=xlog(1+x)-\int {\frac {x}{1+x}}dx\!}$

${\displaystyle \int log(1+x)dx=xlog(1+x)-\int (1-{\frac {1}{1+x}})dx\!}$

${\displaystyle \int log(1+x)dx=xlog(1+x)-x+log(1+x)+C\!}$

Therefore:

                                     ${\displaystyle \int log(1+x)dx=(x+1)log(1+x)-x+C\!}$


Using the General Binomial Theorem:

${\displaystyle (x+y)^{0}=\sum _{k=0}^{0}{\binom {0}{k}}x^{0-k}y^{k}=1\!}$

Therefore: ${\displaystyle \int (1)log(1+x)dx=\int log(1+x)dx\!}$

Which we have previously found that answer as:

                                     ${\displaystyle \int log(1+x)dx=(x+1)log(1+x)-x+C\!}$


For ${\displaystyle n=1\!}$ :

${\displaystyle \int x^{1}log(1+x)dx=\int xlog(1+x)dx\!}$

Initially we use the following substitutions: ${\displaystyle t=1+x,x=t-1,dt=dx\!}$

${\displaystyle \int xlog(1+x)dx=\int (t-1)log(t)dt=\int (tlog(t)-\log(t))dt\!}$

First let us consider the first term: ${\displaystyle \int tlog(t)dt\!}$

Next, we use the integration by parts: ${\displaystyle u=\log {t},du={\frac {1}{t}}dt,dv=tdt,v={\frac {1}{2}}t^{2}\!}$
${\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}t^{2}({\frac {1}{t}}dt)\!}$

${\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}tdt)\!}$

${\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}\!}$

Next let us consider the second term: ${\displaystyle \int log(t)dt\!}$

Again, we will use integration by parts: ${\displaystyle u=\log {t},du={\frac {1}{t}}dt,dv=dt,v=t\!}$
${\displaystyle \int tlog(t)dt=tlog(t)-\int t({\frac {1}{t}}dt)\!}$

${\displaystyle \int tlog(t)dt=tlog(t)-\int dt\!}$

${\displaystyle \int tlog(t)dt=tlog(t)-t\!}$

Therefore:

${\displaystyle \int (tlog(t)-\log(t))dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}-(tlog(t)-t)\!}$

${\displaystyle \int (tlog(t)-\log(t))dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}-tlog(t)+t\!}$

Re-substituting for t:

${\displaystyle \int xlog(1+x)dx={\frac {1}{2}}(1+x)^{2}log(1+x)-{\frac {1}{4}}(1+x)^{2}-(1+x)log(1+x)+(1+x)+C\!}$

${\displaystyle \int xlog(1+x)dx=(1+x)({\frac {1}{2}}(1+x)log(1+x)-{\frac {1}{4}}(1+x)-log(1+x)+1)+C\!}$

${\displaystyle \int xlog(1+x)dx=(1+x)({\frac {1}{2}}xlog(1+x)-{\frac {1}{2}}log(1+x)-{\frac {1}{4}}x+{\frac {3}{4}})+C\!}$

Therefore:

                                     ${\displaystyle \int xlog(1+x)dx=(1+x)({\frac {1}{2}}xlog(1+x)-{\frac {1}{2}}log(1+x)-{\frac {1}{4}}x+{\frac {3}{4}})+C\!}$


Using the General Binomial Theorem for the integral with t substitution ${\displaystyle \int (t-1)log(t)dt\!}$ :

${\displaystyle (x+y)^{1}=(t+(-1))^{1}=(t+(-1))=\sum _{k=0}^{1}{\binom {1}{k}}x^{1-k}y^{k}=\sum _{k=0}^{1}{\binom {1}{k}}t^{1-k}(-1)^{k}=t-1\!}$

Therefore: ${\displaystyle \int (t-1)log(t)dt=\int xlog(1+x)dx\!}$

Which we have previously found that answer as:

                                     ${\displaystyle \int xlog(1+x)dx=(1+x)({\frac {1}{2}}xlog(1+x)-{\frac {1}{2}}log(1+x)-{\frac {1}{4}}x+{\frac {3}{4}})+C\!}$


## R5.9

Solved by: Gonzalo Perez

#### Problem Statement

Consider the L2-ODE-CC (5) p.7b-7 with ${\displaystyle log(1+x)\!}$  as excitation:

${\displaystyle y''-3y'+2y=r(x)\!}$  (5) p.7b-7

${\displaystyle r(x)=log(1+x)\!}$  (1) p.7c-28

and the initial conditions

${\displaystyle y({\frac {-3}{4}})=1,y'({\frac {-3}{4}})=0\!}$ .

#### Part A

Project the excitation ${\displaystyle r(x)\!}$  on the polynomial basis

${\displaystyle {b_{j}(x)=x^{j},j=0,1,...,n}\!}$  (1)

i.e., find ${\displaystyle d_{j}\!}$  such that

${\displaystyle r(x)\approx r_{n}(x)=\sum _{j=0}^{n}d_{j}x^{j}\!}$  (2)

for x in ${\displaystyle [{\frac {-3}{4}},3]\!}$ , and for n = 3, 6, 9.

Plot ${\displaystyle r(x)\!}$  and ${\displaystyle r_{n}(x)\!}$  to show uniform approximation and convergence.

Note that:

${\displaystyle \left\langle x^{i},r\right\rangle =\int _{a}^{b}x^{i}log(1+x)dx\!}$  (3)

#### Solution

To solve this problem, it is important to know that the scalar product is defined as the following:

${\displaystyle \left\langle b_{0},b_{0}\right\rangle =\int x^{0}\cdot x^{0}dx\!}$ .

Therefore, it follows that:

${\displaystyle \left\langle b_{i},b_{j}\right\rangle =\int x^{i}\cdot x^{j}dx\!}$ , where ${\displaystyle b_{i}(x)=x^{i}\!}$  and ${\displaystyle b_{j}(x)=x^{j}\!}$ .

We know that if ${\displaystyle b_{1},b_{2}\!}$  are linearly independent, then by theorem on p.7c-37, the matrix is solvable.

According to this and (3)p.8-14:

If ${\displaystyle \Gamma \neq 0\Rightarrow \Gamma ^{-1}\!}$  exists ${\displaystyle \Rightarrow c=\Gamma ^{-1}d\!}$ . (3)p.8-14

Now let's define the Gram matrix ${\displaystyle \Gamma \!}$  as a function of ${\displaystyle b_{i}\!}$ :

${\displaystyle \Gamma (b_{i})={\begin{bmatrix}\left\langle b_{0},b_{0}\right\rangle &\left\langle b_{0},b_{1}\right\rangle &...&\left\langle b_{0},b_{n}\right\rangle \\...&...&...&...\\...&...&...&...\\\left\langle b_{n},b_{0}\right\rangle &\left\langle b_{n},b_{1}\right\rangle &...&\left\langle b_{n},b_{n}\right\rangle \end{bmatrix}}\!}$  (1)p.8-13

Defining the "d" matrix as was done in (3)p.8-13, we get:

${\displaystyle d={\begin{Bmatrix}\left\langle b_{0},r\right\rangle \\\left\langle b_{1},r\right\rangle \\...\\\left\langle b_{n},r\right\rangle \end{Bmatrix}}\!}$ . (3)p.8-13

And according to (1)p.8-15: ${\displaystyle r_{n}(x)=\sum _{0}^{n}c_{i}x^{i}\!}$  (1)p.8-15

Now, we can find the values to compare ${\displaystyle r_{n}\!}$  to ${\displaystyle y\!}$ .

Using Matlab, this is the code that was used to produce the results:

The Matlab code above produced the following graph:

Where ${\displaystyle r_{n}(x)\!}$  is represented by the dashed line and the approximation,${\displaystyle y(x)\!}$ , is represented by the red line. This code can work for all n values.

#### Part B

In a seperate series of plots, compare the approximation of the function ${\displaystyle \log(x+1)\!}$  by Taylor series expansion about ${\displaystyle x=0\!}$ .

Where: ${\displaystyle f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}({\hat {x}})}{n!}}(x-{\hat {x}})^{n}\!}$

##### Solution

For n=1:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}\!}$

For n=2:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}\!}$

For n=3:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}\!}$

For n=4:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}\!}$

For n=5:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}\!}$

For n=6:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}\!}$

For n=7:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}\!}$

For n=8:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}\!}$

For n=9:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}\!}$

For n=10:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}\!}$

For n=11:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$

For n=12:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$  ${\displaystyle -{\frac {x^{12}}{\log(10^{12})}}\!}$

For n=13:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$  ${\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}\!}$

For n=14:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$  ${\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}-{\frac {x^{14}}{\log(10^{14})}}\!}$

For n=15:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$  ${\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}-{\frac {x^{14}}{\log(10^{14})}}+{\frac {x^{15}}{\log(10^{15})}}\!}$

For n=16:

${\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}-{\frac {x^{10}}{\log(10^{10})}}+{\frac {x^{11}}{\log(10^{11})}}\!}$  ${\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}-{\frac {x^{14}}{\log(10^{14})}}+{\frac {x^{15}}{\log(10^{15})}}-{\frac {x^{16}}{\log(10^{16})}}\!}$

Using Matlab to plot the graph:

#### Part 2

Find ${\displaystyle y_{n}(x)\!}$  such that:

${\displaystyle y_{n}''+ay_{n}'+by_{n}=r_{n}(x)\!}$  (1) p.7c-27

with the same initial conditions as in (2) p.7c-28.

Plot ${\displaystyle y_{n}(x)\!}$  for n = 3, 6, 9, for x in ${\displaystyle [{\frac {-3}{4}},3]\!}$ .

In a series of separate plots, compare the results obtained with the projected excitation on polynomial basis to those with truncated Taylor series of the excitation. Plot also the numerical solution as a baseline for comparison.

#### Solution

First, we find the homogeneous solution to the ODE:
The characteristic equation is:
${\displaystyle \lambda ^{2}-3\lambda +2=0\!}$
${\displaystyle (\lambda -2)(\lambda -1)=0\!}$
Then, ${\displaystyle \lambda =1,2\!}$
Therefore the homogeneous solution is:
${\displaystyle y_{h}=C_{1}e^{(}2x)+c_{2}e^{x}\!}$

Now to find the particulate solution

For n=3:

${\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}$

${\displaystyle r(x)={\frac {x}{\ln(10)}}-{\frac {x^{2}}{2\ln(10)}}+{\frac {x^{3}}{3\ln(10)}}\!}$

We can then use a matrix to organize the known coefficients:

${\displaystyle {\begin{bmatrix}2&-3&2&0&0\\0&2&-6&6&0\\0&0&2&-9&12\\0&0&0&2&-12\\0&0&0&0&2\\\end{bmatrix}}{\begin{bmatrix}K_{0}\\K_{1}\\K_{2}\\K_{3}\end{bmatrix}}={\begin{bmatrix}0\\{\frac {1}{ln(10)}}\\{\frac {1}{2ln(10)}}\\{\frac {1}{3ln(10)}}\end{bmatrix}}\!}$

Then, using MATLAB and the backlash operator we can solve for these unknowns:

Therefore
${\displaystyle y_{p4}=4.0444+3.7458x+1.5743x^{2}+0.3981x^{3}+0.0543x^{4}\!}$

Superposing the homogeneous and particulate solution we get
${\displaystyle y_{n}=4.0444+3.7458x+1.5743x^{2}+0.3981x^{3}+0.0543x^{4}+C_{1}e^{2x}+C_{2}e^{x}\!}$

Differentiating:
${\displaystyle y'_{n}=3.7458+3.1486x+1.1943x^{2}+0.2172x^{3}+2C_{1}e^{2x}+C_{2}e^{x}\!}$  Evaluating at the initial conditions:
${\displaystyle y(-0.75)=0.9698261719+0.231301601C_{!}+0.4723665527C_{2}=1\!}$
${\displaystyle y'(-0.75)=1.9645125+0.4462603203C_{1}+0.4723665527C_{2}=0\!}$

We obtain:
${\displaystyle C_{1}=-4.46\!}$
${\displaystyle C_{2}=0.055\!}$

Finally we have:
${\displaystyle y_{n}=4.0444+3.7458x+1.5743x^{2}+0.3981x^{3}+0.0543x^{4}-4.46e^{2x}+0.055e^{x}\!}$

For n=6:

${\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}$

${\displaystyle r(x)={\frac {x}{\ln(10)}}-{\frac {x^{2}}{2\ln(10)}}+{\frac {x^{3}}{3\ln(10)}}-{\frac {x^{4}}{4\ln(10)}}+{\frac {x^{5}}{5\ln(10)}}-{\frac {x^{6}}{6\ln(10)}}\!}$

We can then use a matrix to organize the known coefficients:

${\displaystyle {\begin{bmatrix}2&-3&2&0&0&0&0&0\\0&2&-6&6&0&0&0&0\\0&0&2&-9&12&0&0&0\\0&0&0&2&-12&20&0&0\\0&0&0&0&2&-15&30&0\\0&0&0&0&0&2&-18&42\\0&0&0&0&0&0&2&-21\\0&0&0&0&0&0&0&2\\\end{bmatrix}}{\begin{bmatrix}K_{0}\\K_{1}\\K_{2}\\K_{3}\\K_{4}\\K_{5}\\K_{6}\end{bmatrix}}{\begin{bmatrix}0\\{\frac {1}{ln(10)}}\\{\frac {1}{2ln(10)}}\\{\frac {1}{3ln(10)}}\\{\frac {1}{4ln(10)}}\\{\frac {1}{5ln(10)}}\\{\frac {1}{6ln(10)}}\end{bmatrix}}\!}$

Then, using MATLAB and the backlash operator we can solve for these unknowns:

Therefore
${\displaystyle y_{p7}=377.4833+375.3933x+185.6066x^{2}+60.5479x^{3}+14.4946x^{4}+2.6492x^{5}+0.3619x^{6}+0.0310x^{7}\!}$

Superposing the homogeneous and particulate solution we get
${\displaystyle y_{n}=377.4833+375.3933x+185.6066x^{2}+60.5479x^{3}+14.4946x^{4}+2.6492x^{5}+0.3619x^{6}+0.0310x^{7}+C_{1}e^{2x}+c_{2}e^{x}\!}$

Differentiating:
${\displaystyle y'_{n}=375.3933+371.213x+181.644x^{2}+57.9784x^{3}+13.46x^{4}+2.1714x^{5}+0.214x^{6}+2C_{1}e^{2x}+C_{2}e^{x}\!}$  Evaluating at the initial conditions:
${\displaystyle y(-0.75)=178.816+0.2231301601C_{!}+0.4723665527C_{2}=1\!}$
${\displaystyle y'(-0.75)=178.413+0.4462603203C_{1}+0.4723665527C_{2}\!}$

We obtain:
${\displaystyle C_{1}=-2.6757\!}$
${\displaystyle C_{2}=-375.173\!}$

Finally
${\displaystyle y_{n}=377.4833+375.3933x+185.6066x^{2}+60.5479x^{3}+14.4946x^{4}+2.6492x^{5}+0.3619x^{6}+0.0310x^{7}+-2.6757e^{2x}-375.173e^{x}\!}$

For n=9:

${\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}$

${\displaystyle r(x)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}-{\frac {x^{4}}{\log(10^{4})}}+{\frac {x^{5}}{\log(10^{5})}}-{\frac {x^{6}}{\log(10^{6})}}+{\frac {x^{7}}{\log(10^{7})}}-{\frac {x^{8}}{\log(10^{8})}}+{\frac {x^{9}}{\log(10^{9})}}\!}$

We can then use a matrix to organize the known coefficients:
${\displaystyle {\begin{bmatrix}K_{0}\\K_{1}\\K_{2}\\K_{3}\\K_{4}\\K_{5}\\K_{6}\\K_{7}\\K_{8}\\K_{9}\end{bmatrix}}={\begin{bmatrix}0\\{\frac {1}{ln(10)}}\\{\frac {1}{2ln(10)}}\\{\frac {1}{3ln(10)}}\\{\frac {1}{4ln(10)}}\\{\frac {1}{5ln(10)}}\\{\frac {1}{6ln(10)}}\\{\frac {1}{7ln(10)}}\\{\frac {1}{8ln(10)}}\\{\frac {1}{9ln(10)}}\end{bmatrix}}\!}$

Then, using MATLAB and the backlash operator we can solve for these unknowns:

Therefore
${\displaystyle y_{p11}=1753158.594+1752673.419x+875851.535x^{2}+291627.134x^{3}+72745.1129x^{4}+14484.362x^{5}+2392.510x^{6}+335.632x^{7}+40.417x^{8}\!}$
${\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)\!}$

Superposing the homogeneous and particulate solution we get
${\displaystyle y_{n}=1753158.594+1752673.419x+875851.535x^{2}+291627.134x^{3}+72745.1129x^{4}+14484.362x^{5}+2392.510x^{6}+335.632x^{7}+40.417x^{8}\!}$
${\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)+C_{1}e^{2x}+C_{2}e^{(}x)\!}$

Differentiating:
${\displaystyle y'_{n}=0.2167x^{1}0+3.474x^{9}+37.3491x^{8}+323.336x^{7}+2349.42x^{6}+14355.1x^{5}+72421.8x^{4}+290980.x^{3}+874881.x^{2}\!}$  ${\displaystyle +1.7517x10^{6}x+1.75267x10^{6}+2C_{1}e^{2x}+C_{2}e^{x}\!}$
Evaluating at the initial conditions:
${\displaystyle y(-0.75)=828254+0.2231301601C_{!}+0.4723665527C_{2}=1\!}$
${\displaystyle y'(-0.75)=828145+0.4462603203C_{1}+0.4723665527C_{2}=0\!}$

We obtain:
${\displaystyle C_{1}=-484.022\!}$
${\displaystyle C_{2}=-1753750\!}$

Finally
${\displaystyle y_{n}=1753158.594+1752673.419x+875851.535x^{2}+291627.134x^{3}+72745.1129x^{4}+14484.362x^{5}+2392.510x^{6}+335.632x^{7}+40.417x^{8}\!}$
${\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)-484.022e^{2x}-1753750e^{x}\!}$

Here is the graph for this problem using Matlab: