Report 5
Intermediate Engineering Analysis
Section 7566
Team 11
Due date: March 30, 2012.
Solved by: Andrea Vargas
Part 1:Determine whether the following are linearly independent using the Wronskian
Part 2: Determine whether the following are linearly independent using the Gramian
Using the Wronskian we check for linear independence.
We know from (1) and (2) in 7-35 that if
W
=
det
[
f
g
f
′
g
′
]
=
f
g
′
−
g
f
′
≠
0
{\displaystyle W=\det {\begin{bmatrix}f&g\\f'&g'\end{bmatrix}}=fg'-gf'\neq 0\!}
Then the functions are linearly independent.
f
(
x
)
=
x
2
{\displaystyle f(x)=x^{2}\!}
g
(
x
)
=
x
4
{\displaystyle g(x)=x^{4}\!}
Taking the derivatives of each function:
f
′
(
x
)
=
2
x
{\displaystyle f'(x)=2x\!}
g
′
(
x
)
=
4
x
3
{\displaystyle g'(x)=4x^{3}\!}
W
=
[
x
2
x
4
2
x
4
x
3
]
=
4
x
5
−
2
x
5
=
2
x
5
≠
0
{\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
f
(
x
)
=
cos
(
x
)
{\displaystyle f(x)=\cos(x)\!}
g
(
x
)
=
sin
(
3
x
)
{\displaystyle g(x)=\sin(3x)\!}
Taking the derivatives of each function:
f
′
(
x
)
=
−
sin
(
x
)
{\displaystyle f'(x)=-\sin(x)\!}
g
′
(
x
)
=
3
cos
(
3
x
)
{\displaystyle g'(x)=3\cos(3x)\!}
W
=
[
cos
(
x
)
sin
(
3
x
)
−
sin
(
x
)
3
cos
(
3
x
)
]
=
3
cos
(
x
)
cos
(
3
x
)
+
sin
(
3
x
)
sin
(
x
)
=≠
0
{\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
Using the Gramian we check for linear independence.
We know from the notes in (1) 7-34 that:
⟨
f
,
g
⟩
:=
∫
a
b
=
f
(
x
)
g
(
x
)
{\displaystyle \langle f,g\rangle :=\int _{a}^{b}=f(x)g(x)\!}
and that the Gramian is defined as:
Γ
(
f
,
g
)
=
d
e
t
[
⟨
f
,
f
⟩
⟨
f
,
g
⟩
⟨
g
,
f
⟩
⟨
g
,
g
⟩
]
{\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
Γ
(
f
,
g
)
≠
0
{\displaystyle \Gamma (f,g)\neq 0\!}
f
(
x
)
=
x
2
{\displaystyle f(x)=x^{2}\!}
g
(
x
)
=
x
4
{\displaystyle g(x)=x^{4}\!}
Taking scalar products:
⟨
f
,
f
⟩
:=
∫
−
1
1
=
f
(
x
)
f
(
x
)
=
x
2
∗
x
2
=
∫
−
1
1
=
x
4
=
[
x
5
5
]
−
1
1
=
2
5
{\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}}\!}
⟨
f
,
g
⟩
=
⟨
g
,
f
⟩
:=
∫
−
1
1
=
f
(
x
)
g
(
x
)
=
x
2
∗
x
4
=
∫
−
1
1
=
x
6
=
[
x
7
7
]
−
1
1
=
2
7
{\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}}\!}
⟨
g
,
g
⟩
:=
∫
−
1
1
=
g
(
x
)
g
(
x
)
=
x
4
∗
x
4
=
∫
−
1
1
=
x
8
=
[
x
9
9
]
−
1
1
=
2
9
{\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}}\!}
Γ
(
f
,
g
)
=
det
[
2
5
2
7
2
7
2
9
]
=
0.08888
−
0.0816326531
≠
0
{\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
f
(
x
)
=
cos
(
x
)
{\displaystyle f(x)=\cos(x)\!}
g
(
x
)
=
sin
(
3
x
)
{\displaystyle g(x)=\sin(3x)\!}
Taking scalar products:
⟨
f
,
f
⟩
:=
∫
−
1
1
=
f
(
x
)
f
(
x
)
=
∫
−
1
1
=
cos
2
(
x
)
d
x
{\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
cos
2
(
x
)
=
1
2
cos
(
2
x
)
+
1
2
{\displaystyle \cos ^{2}(x)={\frac {1}{2}}\cos(2x)+{\frac {1}{2}}\!}
Then we have,
∫
−
1
1
1
2
cos
(
2
x
)
+
1
2
d
x
=
[
1
4
sin
(
2
x
)
+
1
2
x
]
−
1
1
{\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}\!}
=
0.7273243567
−
(
−
0.7273243567
)
=
1.454648713
{\displaystyle =0.7273243567-(-0.7273243567)=1.454648713\!}
⟨
f
,
g
⟩
=
⟨
g
,
f
⟩
:=
∫
−
1
1
f
(
x
)
g
(
x
)
d
x
{\displaystyle \langle f,g\rangle =\langle g,f\rangle :=\int _{-1}^{1}f(x)g(x)dx\!}
=
∫
−
1
1
sin
(
3
x
)
cos
(
x
)
d
x
=
[
1
8
(
−
2
cos
(
2
x
)
−
cos
(
4
x
)
)
]
−
1
1
{\displaystyle =\int _{-1}^{1}\sin(3x)\cos(x)dx=\left[{\frac {1}{8}}(-2\cos(2x)-\cos(4x))\right]_{-1}^{1}\!}
=
0.185742
−
0.185742
=
0
{\displaystyle =0.185742-0.185742=0\!}
⟨
g
,
g
⟩
:=
∫
−
1
1
g
(
x
)
g
(
x
)
d
x
=
∫
−
1
1
sin
(
3
x
)
sin
(
3
x
)
d
x
{\displaystyle \langle g,g\rangle :=\int _{-1}^{1}g(x)g(x)dx=\int _{-1}^{1}\sin(3x)\sin(3x)dx\!}
=
1
2
∫
−
1
1
1
−
cos
(
6
x
)
d
x
=
[
1
2
(
x
−
1
6
sin
(
6
x
)
)
]
−
1
1
{\displaystyle ={\frac {1}{2}}\int _{-1}^{1}1-\cos(6x)dx=\left[{\frac {1}{2}}(x-{\frac {1}{6}}\sin(6x))\right]_{-1}^{1}\!}
=
0.523285
+
0.523285
=
1.04656925
{\displaystyle =0.523285+0.523285=1.04656925\!}
Γ
(
f
,
g
)
=
det
[
1.454648713
0
0
1.04656925
]
=
1.522390612
≠
0
{\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
By both methods (the Wronskian and the Gramian) we obtain the same results.
Verify using the Gramian that the following two vectors are linearly independent.
b
1
=
2
e
1
+
7
e
2
{\displaystyle \mathbf {b_{1}} =2\mathbf {e_{1}} +7\mathbf {e_{2}} \!}
b
1
=
1.5
e
1
+
3
e
2
{\displaystyle \mathbf {b_{1}} =1.5\mathbf {e_{1}} +3\mathbf {e_{2}} \!}
Γ
(
f
,
g
)
=
d
e
t
[
⟨
b
1
,
b
1
⟩
⟨
b
1
,
b
2
⟩
⟨
b
2
,
b
1
⟩
⟨
b
2
,
b
2
⟩
]
{\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:
⟨
b
1
,
b
2
⟩
=
b
1
⋅
b
2
<
b
r
>
{\displaystyle \langle \mathbf {b1} ,\mathbf {b2} \rangle =\mathbf {b1} \cdot \mathbf {b2} <br>\!}
We obtain,
⟨
b
1
,
b
1
⟩
=
(
2
)
(
2
)
+
(
7
)
(
7
)
=
4
+
49
=
53
{\displaystyle \langle \mathbf {b1} ,\mathbf {b1} \rangle =(2)(2)+(7)(7)=4+49=53\!}
⟨
b
1
,
b
2
⟩
=
⟨
b
2
,
b
1
⟩
=
(
1.5
)
(
2
)
+
(
7
)
(
3
)
=
3
+
21
=
24
{\displaystyle \langle \mathbf {b1} ,\mathbf {b2} \rangle =\langle \mathbf {b2} ,\mathbf {b1} \rangle =(1.5)(2)+(7)(3)=3+21=24\!}
⟨
b
2
,
b
2
⟩
=
(
1.5
)
(
1.5
)
+
(
3
)
(
3
)
=
2.25
+
9
=
11.25
{\displaystyle \langle \mathbf {b2} ,\mathbf {b2} \rangle =(1.5)(1.5)+(3)(3)=2.25+9=11.25\!}
Then,
Γ
(
f
,
g
)
=
d
e
t
[
53
24
24
11.25
]
=
596.25
−
576
=
20.25
≠
0
{\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
Show that
y
p
(
x
)
=
∑
i
=
0
n
y
p
,
i
(
x
)
{\displaystyle y_{p}(x)=\sum _{i=0}^{n}y_{p,i}(x)\!}
is indeed the overall particular solution of the L2-ODE-VC
y
″
+
p
(
x
)
y
′
+
q
(
x
)
y
=
r
(
x
)
{\displaystyle y''+p(x)y'+q(x)y=r(x)\!}
with the excitation
r
(
x
)
=
r
1
(
x
)
+
r
2
(
x
)
+
.
.
.
+
r
n
(
x
)
=
∑
i
=
0
n
r
i
(
x
)
{\displaystyle r(x)=r_{1}(x)+r_{2}(x)+...+r_{n}(x)=\sum _{i=0}^{n}r_{i}(x)\!}
.
Discuss the choice of
y
p
(
x
)
{\displaystyle y_{p}(x)\!}
in the above table e.g., for
r
(
x
)
=
k
cos
ω
x
{\displaystyle r(x)=k\cos \omega x\!}
why would you need to have both
cos
ω
x
{\displaystyle \cos \omega x\!}
and
sin
ω
x
{\displaystyle \sin \omega x\!}
in
y
p
(
x
)
{\displaystyle y_{p}(x)\!}
?
Because the ODE is a linear equation in y and its derivatives with respect to x, the superposition principle can be applied:
r
1
(
x
)
{\displaystyle r_{1}(x)\!}
is a specific excitation with known form of
y
p
1
(
x
)
{\displaystyle y_{p1}(x)\!}
and
r
2
(
x
)
{\displaystyle r_{2}(x)\!}
is a specific excitation with known form of
y
p
2
(
x
)
{\displaystyle y_{p2}(x)\!}
+
{
y
p
1
″
+
p
(
x
)
y
p
1
′
+
q
(
x
)
y
p
1
=
r
1
(
x
)
y
p
2
″
+
p
(
x
)
y
p
2
′
+
q
(
x
)
y
p
2
=
r
2
(
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
(
y
p
1
+
y
p
2
)
″
+
p
(
x
)
(
y
p
1
+
y
p
2
)
′
+
q
(
x
)
(
y
p
1
+
y
p
2
)
=
r
1
(
x
)
+
r
2
(
x
)
{\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
y
p
(
x
)
=
∑
i
=
0
n
y
p
,
i
(
x
)
{\displaystyle y_{p}(x)=\sum _{i=0}^{n}y_{p,i}(x)\!}
is indeed the overall particular solution of the L2-ODE-VC
y
″
+
p
(
x
)
y
′
+
q
(
x
)
y
=
r
(
x
)
{\displaystyle y''+p(x)y'+q(x)y=r(x)\!}
with the excitation
r
(
x
)
=
∑
i
=
0
n
r
i
(
x
)
{\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:
f
(
x
)
=
a
0
+
∑
n
=
1
∞
[
a
n
cos
ω
x
+
b
n
sin
ω
x
]
{\displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }[a_{n}\cos \omega x+b_{n}\sin \omega x]\!}
where the coefficients
a
0
,
a
n
,
b
n
{\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
r
(
x
)
=
k
cos
ω
x
{\displaystyle r(x)=k\cos \omega x\!}
the particular solution would still include both
sin
ω
x
{\displaystyle \sin \omega x\!}
and
cos
ω
x
{\displaystyle \cos \omega x\!}
in
y
p
(
x
)
{\displaystyle y_{p}(x)\!}
because the excitation is a periodic function that can be represented as the Fourier infinite series in terms of both
sin
ω
x
{\displaystyle \sin \omega x\!}
and
cos
ω
x
{\displaystyle \cos \omega x\!}
times the Fourier coefficients
Show that
c
o
s
(
7
x
)
{\displaystyle cos(7x)}
and
s
i
n
(
7
x
)
{\displaystyle sin(7x)}
are linearly independant using the Wronskian and the Gramain (integrate over 1 period)
f
=
c
o
s
(
7
x
)
,
g
=
s
i
n
(
7
x
)
{\displaystyle f=cos(7x),g=sin(7x)}
One period of
7
x
=
π
/
7
{\displaystyle 7x=\pi /7}
Wronskian of f and g
W
(
f
,
g
)
=
d
e
t
[
f
g
f
′
g
′
]
{\displaystyle W(f,g)=det{\begin{bmatrix}f&g\\f'&g'\end{bmatrix}}}
Plugging in values for
f
,
f
′
,
g
,
g
′
;
{\displaystyle f,f',g,g';}
W
(
f
,
g
)
=
d
e
t
[
c
o
s
(
7
x
)
s
i
n
(
7
x
)
−
s
i
n
(
7
x
)
c
o
s
(
7
x
)
]
{\displaystyle W(f,g)=det{\begin{bmatrix}cos(7x)&sin(7x)\\-sin(7x)&cos(7x)\end{bmatrix}}}
=
7
c
o
s
2
(
7
x
)
+
7
s
i
n
2
(
7
x
)
{\displaystyle =7cos^{2}(7x)+7sin^{2}(7x)}
=
7
[
c
o
s
2
(
7
x
)
+
s
i
n
2
(
7
x
)
]
{\displaystyle =7[cos^{2}(7x)+sin^{2}(7x)]}
=
7
[
1
]
{\displaystyle =7[1]}
They are linearly Independant using the Wronskian.
<
f
,
g
>=
∫
a
b
f
(
x
)
g
(
x
)
d
x
{\displaystyle <f,g>=\int _{a}^{b}f(x)g(x)dx}
Γ
(
f
,
g
)
=
d
e
t
[
<
f
,
f
>
<
f
,
g
>
<
g
,
f
>
<
g
,
g
>
]
{\displaystyle \Gamma (f,g)=det{\begin{bmatrix}<f,f>&<f,g>\\<g,f>&<g,g>\end{bmatrix}}}
∫
0
π
/
7
c
o
s
2
(
7
x
)
d
x
=
π
/
14
{\displaystyle \int _{0}^{\pi /7}cos^{2}(7x)dx=\pi /14}
∫
0
π
/
7
s
i
n
2
(
7
x
)
d
x
=
π
/
14
{\displaystyle \int _{0}^{\pi /7}sin^{2}(7x)dx=\pi /14}
∫
0
π
/
7
c
o
s
(
7
x
)
∗
s
i
n
(
7
x
)
d
x
=
0
{\displaystyle \int _{0}^{\pi /7}cos(7x)*sin(7x)dx=0}
Γ
(
f
,
g
)
=
d
e
t
[
π
/
14
0
0
π
/
14
]
{\displaystyle \Gamma (f,g)=det{\begin{bmatrix}\pi /14&0\\0&\pi /14\end{bmatrix}}}
Γ
(
f
,
g
)
=
π
2
/
49
{\displaystyle \Gamma (f,g)=\pi ^{2}/49}
They are linearly Independent using the Gramain.
Find 2 equations for the 2 unknowns M,N and solve for M,N.
y
p
(
x
)
=
M
c
o
s
7
x
+
N
s
i
n
7
x
{\displaystyle y_{p}(x)=Mcos7x+Nsin7x}
y
p
′
(
x
)
=
−
M
7
s
i
n
7
x
+
N
7
c
o
s
7
x
{\displaystyle y'_{p}(x)=-M7sin7x+N7cos7x}
y
p
″
(
x
)
=
−
M
7
2
c
o
s
7
x
−
N
7
2
s
i
n
7
x
{\displaystyle y''_{p}(x)=-M7^{2}cos7x-N7^{2}sin7x}
Plugging these values into the equation given (
y
″
−
3
y
′
−
10
y
=
3
c
o
s
7
x
{\displaystyle y''-3y'-10y=3cos7x}
) yields;
−
M
7
2
c
o
s
7
x
−
N
7
2
s
i
n
7
x
−
3
(
−
M
7
s
i
n
7
x
+
N
7
c
o
s
7
x
)
−
10
(
M
c
o
s
7
x
+
N
s
i
n
7
x
)
=
3
c
o
s
7
x
{\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;
−
59
M
−
21
N
=
3
{\displaystyle -59M-21N=3}
−
59
N
+
21
M
=
0
{\displaystyle -59N+21M=0}
Solving for M and N results in;
M
=
−
177
/
3922
,
N
=
−
63
/
3922
{\displaystyle M=-177/3922,N=-63/3922}
Find the overall solution
y
(
x
)
{\displaystyle y(x)}
that corresponds to the initial conditions
y
(
0
)
=
1
,
y
′
(
0
)
=
0
{\displaystyle y(0)=1,y'(0)=0}
. Plot over three periods.
From before, one period
=
π
/
7
{\displaystyle =\pi /7}
so therefore, three periods is
3
π
/
7.
{\displaystyle 3\pi /7.}
Using the roots given in the notes
λ
1
=
−
2
,
λ
2
=
5
{\displaystyle \lambda _{1}=-2,\lambda _{2}=5}
, the homogenous solution becomes;
y
h
(
x
)
=
c
1
e
−
2
x
+
c
2
e
5
x
{\displaystyle y_{h}(x)=c_{1}e^{-2x}+c_{2}e^{5x}}
Using initial condtion
y
(
0
)
=
1
{\displaystyle y(0)=1}
;
1
=
c
1
+
c
2
{\displaystyle 1=c_{1}+c_{2}}
y
h
′
(
x
)
=
−
2
c
1
e
−
2
x
+
5
c
2
e
5
x
{\displaystyle y'_{h}(x)=-2c_{1}e^{-2x}+5c_{2}e^{5x}}
with
y
′
(
0
)
=
0
{\displaystyle y'(0)=0}
0
=
−
2
c
1
+
5
c
2
{\displaystyle 0=-2c_{1}+5c_{2}}
Solving for the constants;
c
1
=
5
/
7
,
c
2
=
2
/
7
{\displaystyle c_{1}=5/7,c_{2}=2/7}
y
h
(
x
)
=
5
/
7
e
−
2
x
+
2
/
7
e
5
x
{\displaystyle y_{h}(x)=5/7e^{-2x}+2/7e^{5x}}
Using the
y
p
(
x
)
{\displaystyle y_{p}(x)}
found in the last part;
y
=
y
h
+
y
p
{\displaystyle y=y_{h}+y_{p}}
y
=
5
/
7
e
−
2
x
+
2
/
7
e
5
x
−
177
/
3922
c
o
s
7
x
−
63
/
3922
s
i
n
7
x
{\displaystyle y=5/7e^{-2x}+2/7e^{5x}-177/3922cos7x-63/3922sin7x}
solved by Luca Imponenti
Complete the solution to the following problem
y
″
+
4
y
′
+
13
y
=
2
e
−
2
x
c
o
s
(
3
x
)
{\displaystyle y''+4y'+13y=2e^{-2x}cos(3x)\!}
where
y
h
=
e
−
2
x
[
A
c
o
s
(
3
x
)
+
B
s
i
n
(
3
x
)
]
{\displaystyle y_{h}=e^{-2x}[Acos(3x)+Bsin(3x)]\!}
and
y
p
=
x
e
−
2
x
[
M
c
o
s
(
3
x
)
+
N
s
i
n
(
3
x
)
]
{\displaystyle y_{p}=xe^{-2x}[Mcos(3x)+Nsin(3x)]\!}
Find the overall solution
y
(
x
)
{\displaystyle y(x)\!}
corresponds to the initial condition:
y
(
0
)
=
1
,
y
′
(
0
)
=
0
{\displaystyle y(0)=1\ ,\ y'(0)=0\!}
Plot the solution over 3 periods.
Taking the derivatives of the particular solution
y
p
(
x
)
{\displaystyle y_{p}(x)\!}
y
p
=
x
e
−
2
x
[
M
c
o
s
(
3
x
)
+
N
s
i
n
(
3
x
)
]
{\displaystyle y_{p}=xe^{-2x}[Mcos(3x)+Nsin(3x)]\!}
y
p
′
=
e
−
2
x
[
s
i
n
(
3
x
)
(
N
−
2
N
x
−
3
M
x
)
+
c
o
s
(
3
x
)
(
3
N
x
+
M
−
2
M
x
)
]
{\displaystyle y'_{p}=e^{-2x}[sin(3x)(N-2Nx-3Mx)+cos(3x)(3Nx+M-2Mx)]\!}
y
p
″
=
e
−
2
x
[
s
i
n
(
3
x
)
(
12
M
x
−
6
M
−
5
N
x
−
4
N
)
+
c
o
s
(
3
x
)
(
6
N
−
5
M
x
−
4
M
−
12
N
x
)
]
{\displaystyle y''_{p}=e^{-2x}[sin(3x)(12Mx-6M-5Nx-4N)+cos(3x)(6N-5Mx-4M-12Nx)]\!}
Plugging these into the ODE yields
s
i
n
(
3
x
)
(
6
M
−
12
M
x
+
5
N
x
+
4
N
)
+
c
o
s
(
3
x
)
(
5
M
x
+
4
M
+
12
N
x
−
6
N
)
+
{\displaystyle sin(3x)(6M-12Mx+5Nx+4N)+cos(3x)(5Mx+4M+12Nx-6N)+\!}
4
[
s
i
n
(
3
x
)
(
N
−
2
N
x
−
3
M
x
)
+
c
o
s
(
3
x
)
(
3
N
x
+
M
−
2
M
x
)
]
+
{\displaystyle 4[sin(3x)(N-2Nx-3Mx)+cos(3x)(3Nx+M-2Mx)]+}
13
x
[
M
c
o
s
(
3
x
)
+
N
s
i
n
(
3
x
)
]
=
2
c
o
s
(
3
x
)
{\displaystyle 13x[Mcos(3x)+Nsin(3x)]=2cos(3x)\!}
Equating like terms allows us to solve for M and N
s
i
n
(
3
x
)
[
(
12
M
x
−
6
M
−
5
N
x
−
4
N
)
+
4
(
N
−
2
N
x
−
3
M
x
)
+
13
N
x
]
=
0
{\displaystyle sin(3x)[(12Mx-6M-5Nx-4N)+4(N-2Nx-3Mx)+13Nx]=0\!}
c
o
s
(
3
x
)
[
(
6
N
−
5
M
x
−
4
M
−
12
N
x
)
+
4
(
3
N
x
+
M
−
2
M
x
)
+
13
M
x
]
=
2
c
o
s
(
3
x
)
{\displaystyle cos(3x)[(6N-5Mx-4M-12Nx)+4(3Nx+M-2Mx)+13Mx]=2cos(3x)\!}
−
6
M
=
0
{\displaystyle -6M=0\!}
6
N
=
2
{\displaystyle 6N=2\!}
M
=
0
,
N
=
1
3
{\displaystyle M=0\ ,\ N={\frac {1}{3}}\!}
So the particular solution is
y
p
=
1
3
x
e
−
2
x
s
i
n
(
3
x
)
{\displaystyle y_{p}={\frac {1}{3}}xe^{-2x}sin(3x)\!}
The overall solution in the sum of the homogeneous and particular solutions
y
(
x
)
=
y
h
(
x
)
+
y
p
(
x
)
{\displaystyle y(x)=y_{h}(x)+y_{p}(x)\!}
y
(
x
)
=
e
−
2
x
[
A
c
o
s
(
3
x
)
+
B
s
i
n
(
3
x
)
]
+
1
3
x
e
−
2
x
s
i
n
(
3
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
y
(
0
)
=
1
,
y
′
(
0
)
=
0
{\displaystyle y(0)=1\ ,\ y'(0)=0\!}
y
(
0
)
=
1
=
A
{\displaystyle y(0)=1=A\!}
Taking the derivative
y
′
(
x
)
=
d
d
x
[
e
−
2
x
[
c
o
s
(
3
x
)
+
B
s
i
n
(
3
x
)
]
+
1
3
x
e
−
2
x
s
i
n
(
3
x
)
]
{\displaystyle y'(x)={\frac {d}{dx}}[e^{-2x}[cos(3x)+Bsin(3x)]+{\frac {1}{3}}xe^{-2x}sin(3x)]\!}
y
′
(
x
)
=
e
−
2
x
[
(
3
B
+
x
−
2
)
c
o
s
(
3
x
)
−
(
2
B
+
2
3
x
+
8
3
)
s
i
n
(
3
x
)
]
{\displaystyle y'(x)=e^{-2x}[(3B+x-2)cos(3x)-(2B+{\frac {2}{3}}x+{\frac {8}{3}})sin(3x)]\!}
y
′
(
0
)
=
0
=
3
B
−
2
{\displaystyle y'(0)=0=3B-2\!}
B
=
2
3
{\displaystyle B={\frac {2}{3}}\!}
Giving us the overall solution
y
(
x
)
=
e
−
2
x
[
c
o
s
(
3
x
)
+
2
3
s
i
n
(
3
x
)
+
1
3
x
s
i
n
(
3
x
)
]
{\displaystyle y(x)=e^{-2x}[cos(3x)+{\frac {2}{3}}sin(3x)+{\frac {1}{3}}xsin(3x)]\!}
The period for
c
o
s
(
3
x
)
,
s
i
n
(
3
x
)
{\displaystyle cos(3x)\ ,\ sin(3x)\!}
is
2
π
3
{\displaystyle {\frac {2\pi }{3}}}
Plotting the solution
y
(
x
)
{\displaystyle y(x)\!}
over 3 periods yields
Solved by Daniel Suh
v
=
4
e
1
+
2
e
2
=
c
1
b
1
+
c
2
b
2
{\displaystyle v=4e_{1}+2e_{2}=c_{1}b_{1}+c{2}b_{2}\!}
b
1
=
2
e
1
+
7
e
2
{\displaystyle b_{1}=2e_{1}+7e_{2}\!}
b
2
=
1.5
e
1
+
3
e
2
{\displaystyle b_{2}=1.5e_{1}+3e_{2}\!}
1. Find the components
c
1
,
c
2
{\displaystyle c_{1},c_{2}\!}
using the Gram matrix.
2. Verify the result by using
b
1
{\displaystyle b_{1}\!}
and
b
2
{\displaystyle b_{2}\!}
, and rely on the non-zero determinant matrix of
b
1
{\displaystyle b_{1}\!}
and
b
2
{\displaystyle b_{2}\!}
relative to the bases of
e
1
{\displaystyle e_{1}\!}
and
e
2
{\displaystyle e_{2}\!}
.
T
(
b
1
,
b
2
)
=
[
<
b
1
,
b
1
>
<
b
1
,
b
2
>
<
b
2
,
b
1
>
<
b
2
,
b
2
>
]
{\displaystyle T(b_{1},b_{2})={\begin{bmatrix}<b_{1},b_{1}>&<b_{1},b_{2}>\\<b_{2},b_{1}>&<b_{2},b_{2}>\end{bmatrix}}}
<
b
i
,
b
j
>=<
b
i
⋅
b
j
>
{\displaystyle <b_{i},b_{j}>=<b_{i}\cdot b_{j}>\!}
Thus,
<
b
1
,
b
1
>=<
b
1
⋅
b
1
>=<
(
2
)
(
2
)
+
(
7
)
(
7
)
>=
53
{\displaystyle <b_{1},b_{1}>=<b_{1}\cdot b_{1}>=<(2)(2)+(7)(7)>=53\!}
<
b
2
,
b
2
>=<
b
2
⋅
b
2
>=<
(
1.5
)
(
1.5
)
+
(
3
)
(
3
)
>=
11.25
{\displaystyle <b_{2},b_{2}>=<b_{2}\cdot b_{2}>=<(1.5)(1.5)+(3)(3)>=11.25\!}
<
b
1
,
b
2
>=<
b
2
,
b
1
>=<
b
1
⋅
b
2
>=<
(
2
)
(
1.5
)
+
(
7
)
(
3
)
>=
24
{\displaystyle <b_{1},b_{2}>=<b_{2},b_{1}>=<b_{1}\cdot b_{2}>=<(2)(1.5)+(7)(3)>=24\!}
T
(
b
1
,
b
2
)
=
[
53
24
24
11.25
]
{\displaystyle T(b_{1},b_{2})={\begin{bmatrix}53&24\\24&11.25\end{bmatrix}}}
Γ
=
d
e
t
[
T
]
=
(
53
)
(
11.25
)
−
(
24
)
(
24
)
=
20.25
{\displaystyle \Gamma =det[T]=(53)(11.25)-(24)(24)=20.25\!}
Define:
c
=
[
c
1
c
2
]
{\displaystyle c={\begin{bmatrix}c_{1}\\c_{2}\end{bmatrix}}}
d
=
[
<
b
1
,
v
>
<
b
2
,
v
>
]
=
[
d
1
d
2
]
{\displaystyle d={\begin{bmatrix}<b_{1},v>\\<b_{2},v>\end{bmatrix}}={\begin{bmatrix}d_{1}\\d_{2}\end{bmatrix}}\!}
If
Γ
≠
0
{\displaystyle \Gamma \neq 0\!}
, then
Γ
−
1
{\displaystyle \Gamma ^{-1}\!}
exists
c
=
Γ
−
1
d
{\displaystyle c=\Gamma ^{-1}d\!}
Γ
=
20.25
≠
0
{\displaystyle \Gamma =20.25\neq 0\!}
thus,
Γ
−
1
{\displaystyle \Gamma ^{-1}\!}
exists
d
=
[
d
1
d
2
]
=
[
(
2
)
(
4
)
+
(
7
)
(
2
)
(
1.5
)
(
4
)
+
(
3
)
(
2
)
]
=
[
22
12
]
{\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}}\!}
[
c
1
c
2
]
=
[
53
24
24
11.25
]
−
1
[
22
12
]
{\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}}\!}
[
c
1
c
2
]
=
[
−
2
5.33
]
{\displaystyle {\begin{bmatrix}c_{1}\\c_{2}\end{bmatrix}}={\begin{bmatrix}-2\\5.33\end{bmatrix}}\!}
v
=
4
e
1
+
2
e
2
≡
c
1
b
1
+
c
2
b
2
{\displaystyle v=4e_{1}+2e_{2}\equiv c_{1}b_{1}+c_{2}b_{2}\!}
c
1
b
1
+
c
2
b
2
=
(
−
2
)
(
2
e
1
+
7
e
2
)
+
(
5.33
)
(
1.5
e
1
+
3
e
2
)
{\displaystyle c_{1}b_{1}+c_{2}b_{2}=(-2)(2e_{1}+7e_{2})+(5.33)(1.5e_{1}+3e_{2})\!}
c
1
b
1
+
c
2
b
2
=
−
4
e
1
−
14
e
2
+
8
e
1
+
16
e
2
{\displaystyle c_{1}b_{1}+c_{2}b_{2}=-4e_{1}-14e_{2}+8e_{1}+16e_{2}\!}
c
1
b
1
+
c
2
b
2
=
4
e
1
+
2
e
2
{\displaystyle c_{1}b_{1}+c_{2}b_{2}=4e_{1}+2e_{2}\!}
v
=
4
e
1
+
2
e
2
≡
c
1
b
1
+
c
2
b
2
{\displaystyle v=4e_{1}+2e_{2}\equiv c_{1}b_{1}+c_{2}b_{2}\!}
∴
{\displaystyle \therefore \!}
solution is correct
Find the integral
∫
x
n
l
o
g
(
1
+
x
)
d
x
{\displaystyle \int x^{n}log(1+x)dx\!}
for
n
=
0
{\displaystyle n=0\!}
and
n
=
1
{\displaystyle n=1\!}
Using integration by parts, and then with the help of of
General Binomial Theorem
(
x
+
y
)
n
=
∑
k
=
0
n
(
n
k
)
x
n
−
k
y
k
{\displaystyle (x+y)^{n}=\sum _{k=0}^{n}{\binom {n}{k}}x^{n-k}y^{k}\!}
For
n
=
0
{\displaystyle n=0\!}
:
∫
x
0
l
o
g
(
1
+
x
)
d
x
=
∫
l
o
g
(
1
+
x
)
d
x
{\displaystyle \int x^{0}log(1+x)dx=\int log(1+x)dx\!}
For substitution by parts,
u
=
l
o
g
(
1
+
x
)
,
d
u
=
1
1
+
x
,
d
v
=
d
x
,
v
=
x
{\displaystyle u=log(1+x),du={\frac {1}{1+x}},dv=dx,v=x\!}
∫
l
o
g
(
1
+
x
)
d
x
=
x
l
o
g
(
1
+
x
)
−
∫
x
1
+
x
d
x
{\displaystyle \int log(1+x)dx=xlog(1+x)-\int {\frac {x}{1+x}}dx\!}
∫
l
o
g
(
1
+
x
)
d
x
=
x
l
o
g
(
1
+
x
)
−
∫
(
1
−
1
1
+
x
)
d
x
{\displaystyle \int log(1+x)dx=xlog(1+x)-\int (1-{\frac {1}{1+x}})dx\!}
∫
l
o
g
(
1
+
x
)
d
x
=
x
l
o
g
(
1
+
x
)
−
x
+
l
o
g
(
1
+
x
)
+
C
{\displaystyle \int log(1+x)dx=xlog(1+x)-x+log(1+x)+C\!}
Therefore:
∫
l
o
g
(
1
+
x
)
d
x
=
(
x
+
1
)
l
o
g
(
1
+
x
)
−
x
+
C
{\displaystyle \int log(1+x)dx=(x+1)log(1+x)-x+C\!}
Using the General Binomial Theorem:
(
x
+
y
)
0
=
∑
k
=
0
0
(
0
k
)
x
0
−
k
y
k
=
1
{\displaystyle (x+y)^{0}=\sum _{k=0}^{0}{\binom {0}{k}}x^{0-k}y^{k}=1\!}
Therefore:
∫
(
1
)
l
o
g
(
1
+
x
)
d
x
=
∫
l
o
g
(
1
+
x
)
d
x
{\displaystyle \int (1)log(1+x)dx=\int log(1+x)dx\!}
Which we have previously found that answer as:
∫
l
o
g
(
1
+
x
)
d
x
=
(
x
+
1
)
l
o
g
(
1
+
x
)
−
x
+
C
{\displaystyle \int log(1+x)dx=(x+1)log(1+x)-x+C\!}
For
n
=
1
{\displaystyle n=1\!}
:
∫
x
1
l
o
g
(
1
+
x
)
d
x
=
∫
x
l
o
g
(
1
+
x
)
d
x
{\displaystyle \int x^{1}log(1+x)dx=\int xlog(1+x)dx\!}
Initially we use the following substitutions:
t
=
1
+
x
,
x
=
t
−
1
,
d
t
=
d
x
{\displaystyle t=1+x,x=t-1,dt=dx\!}
∫
x
l
o
g
(
1
+
x
)
d
x
=
∫
(
t
−
1
)
l
o
g
(
t
)
d
t
=
∫
(
t
l
o
g
(
t
)
−
log
(
t
)
)
d
t
{\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:
∫
t
l
o
g
(
t
)
d
t
{\displaystyle \int tlog(t)dt\!}
Next, we use the integration by parts:
u
=
log
t
,
d
u
=
1
t
d
t
,
d
v
=
t
d
t
,
v
=
1
2
t
2
{\displaystyle u=\log {t},du={\frac {1}{t}}dt,dv=tdt,v={\frac {1}{2}}t^{2}\!}
∫
t
l
o
g
(
t
)
d
t
=
1
2
t
2
l
o
g
(
t
)
−
∫
1
2
t
2
(
1
t
d
t
)
{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}t^{2}({\frac {1}{t}}dt)\!}
∫
t
l
o
g
(
t
)
d
t
=
1
2
t
2
l
o
g
(
t
)
−
∫
1
2
t
d
t
)
{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}tdt)\!}
∫
t
l
o
g
(
t
)
d
t
=
1
2
t
2
l
o
g
(
t
)
−
1
4
t
2
{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}\!}
Next let us consider the second term:
∫
l
o
g
(
t
)
d
t
{\displaystyle \int log(t)dt\!}
Again, we will use integration by parts:
u
=
log
t
,
d
u
=
1
t
d
t
,
d
v
=
d
t
,
v
=
t
{\displaystyle u=\log {t},du={\frac {1}{t}}dt,dv=dt,v=t\!}
∫
t
l
o
g
(
t
)
d
t
=
t
l
o
g
(
t
)
−
∫
t
(
1
t
d
t
)
{\displaystyle \int tlog(t)dt=tlog(t)-\int t({\frac {1}{t}}dt)\!}
∫
t
l
o
g
(
t
)
d
t
=
t
l
o
g
(
t
)
−
∫
d
t
{\displaystyle \int tlog(t)dt=tlog(t)-\int dt\!}
∫
t
l
o
g
(
t
)
d
t
=
t
l
o
g
(
t
)
−
t
{\displaystyle \int tlog(t)dt=tlog(t)-t\!}
Therefore:
∫
(
t
l
o
g
(
t
)
−
log
(
t
)
)
d
t
=
1
2
t
2
l
o
g
(
t
)
−
1
4
t
2
−
(
t
l
o
g
(
t
)
−
t
)
{\displaystyle \int (tlog(t)-\log(t))dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}-(tlog(t)-t)\!}
∫
(
t
l
o
g
(
t
)
−
log
(
t
)
)
d
t
=
1
2
t
2
l
o
g
(
t
)
−
1
4
t
2
−
t
l
o
g
(
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:
∫
x
l
o
g
(
1
+
x
)
d
x
=
1
2
(
1
+
x
)
2
l
o
g
(
1
+
x
)
−
1
4
(
1
+
x
)
2
−
(
1
+
x
)
l
o
g
(
1
+
x
)
+
(
1
+
x
)
+
C
{\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\!}
∫
x
l
o
g
(
1
+
x
)
d
x
=
(
1
+
x
)
(
1
2
(
1
+
x
)
l
o
g
(
1
+
x
)
−
1
4
(
1
+
x
)
−
l
o
g
(
1
+
x
)
+
1
)
+
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\!}
∫
x
l
o
g
(
1
+
x
)
d
x
=
(
1
+
x
)
(
1
2
x
l
o
g
(
1
+
x
)
−
1
2
l
o
g
(
1
+
x
)
−
1
4
x
+
3
4
)
+
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:
∫
x
l
o
g
(
1
+
x
)
d
x
=
(
1
+
x
)
(
1
2
x
l
o
g
(
1
+
x
)
−
1
2
l
o
g
(
1
+
x
)
−
1
4
x
+
3
4
)
+
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\!}
Using the General Binomial Theorem for the integral with t substitution
∫
(
t
−
1
)
l
o
g
(
t
)
d
t
{\displaystyle \int (t-1)log(t)dt\!}
:
(
x
+
y
)
1
=
(
t
+
(
−
1
)
)
1
=
(
t
+
(
−
1
)
)
=
∑
k
=
0
1
(
1
k
)
x
1
−
k
y
k
=
∑
k
=
0
1
(
1
k
)
t
1
−
k
(
−
1
)
k
=
t
−
1
{\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:
∫
(
t
−
1
)
l
o
g
(
t
)
d
t
=
∫
x
l
o
g
(
1
+
x
)
d
x
{\displaystyle \int (t-1)log(t)dt=\int xlog(1+x)dx\!}
Which we have previously found that answer as:
∫
x
l
o
g
(
1
+
x
)
d
x
=
(
1
+
x
)
(
1
2
x
l
o
g
(
1
+
x
)
−
1
2
l
o
g
(
1
+
x
)
−
1
4
x
+
3
4
)
+
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\!}
Solved by: Gonzalo Perez
Consider the L2-ODE-CC (5) p.7b-7 with
l
o
g
(
1
+
x
)
{\displaystyle log(1+x)\!}
as excitation:
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y''-3y'+2y=r(x)\!}
(5) p.7b-7
r
(
x
)
=
l
o
g
(
1
+
x
)
{\displaystyle r(x)=log(1+x)\!}
(1) p.7c-28
and the initial conditions
y
(
−
3
4
)
=
1
,
y
′
(
−
3
4
)
=
0
{\displaystyle y({\frac {-3}{4}})=1,y'({\frac {-3}{4}})=0\!}
.
Project the excitation
r
(
x
)
{\displaystyle r(x)\!}
on the polynomial basis
b
j
(
x
)
=
x
j
,
j
=
0
,
1
,
.
.
.
,
n
{\displaystyle {b_{j}(x)=x^{j},j=0,1,...,n}\!}
(1)
i.e., find
d
j
{\displaystyle d_{j}\!}
such that
r
(
x
)
≈
r
n
(
x
)
=
∑
j
=
0
n
d
j
x
j
{\displaystyle r(x)\approx r_{n}(x)=\sum _{j=0}^{n}d_{j}x^{j}\!}
(2)
for x in
[
−
3
4
,
3
]
{\displaystyle [{\frac {-3}{4}},3]\!}
, and for n = 3, 6, 9.
Plot
r
(
x
)
{\displaystyle r(x)\!}
and
r
n
(
x
)
{\displaystyle r_{n}(x)\!}
to show uniform approximation and convergence.
Note that:
⟨
x
i
,
r
⟩
=
∫
a
b
x
i
l
o
g
(
1
+
x
)
d
x
{\displaystyle \left\langle x^{i},r\right\rangle =\int _{a}^{b}x^{i}log(1+x)dx\!}
(3)
To solve this problem, it is important to know that the scalar product is defined as the following:
⟨
b
0
,
b
0
⟩
=
∫
x
0
⋅
x
0
d
x
{\displaystyle \left\langle b_{0},b_{0}\right\rangle =\int x^{0}\cdot x^{0}dx\!}
.
Therefore, it follows that:
⟨
b
i
,
b
j
⟩
=
∫
x
i
⋅
x
j
d
x
{\displaystyle \left\langle b_{i},b_{j}\right\rangle =\int x^{i}\cdot x^{j}dx\!}
, where
b
i
(
x
)
=
x
i
{\displaystyle b_{i}(x)=x^{i}\!}
and
b
j
(
x
)
=
x
j
{\displaystyle b_{j}(x)=x^{j}\!}
.
We know that if
b
1
,
b
2
{\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
Γ
≠
0
⇒
Γ
−
1
{\displaystyle \Gamma \neq 0\Rightarrow \Gamma ^{-1}\!}
exists
⇒
c
=
Γ
−
1
d
{\displaystyle \Rightarrow c=\Gamma ^{-1}d\!}
. (3)p.8-14
Now let's define the Gram matrix
Γ
{\displaystyle \Gamma \!}
as a function of
b
i
{\displaystyle b_{i}\!}
:
Γ
(
b
i
)
=
[
⟨
b
0
,
b
0
⟩
⟨
b
0
,
b
1
⟩
.
.
.
⟨
b
0
,
b
n
⟩
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
⟨
b
n
,
b
0
⟩
⟨
b
n
,
b
1
⟩
.
.
.
⟨
b
n
,
b
n
⟩
]
{\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:
d
=
{
⟨
b
0
,
r
⟩
⟨
b
1
,
r
⟩
.
.
.
⟨
b
n
,
r
⟩
}
{\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:
r
n
(
x
)
=
∑
0
n
c
i
x
i
{\displaystyle r_{n}(x)=\sum _{0}^{n}c_{i}x^{i}\!}
(1)p.8-15
Now, we can find the values to compare
r
n
{\displaystyle r_{n}\!}
to
y
{\displaystyle y\!}
.
Using Matlab, this is the code that was used to produce the results:
The Matlab code above produced the following graph:
Where
r
n
(
x
)
{\displaystyle r_{n}(x)\!}
is represented by the dashed line and the approximation,
y
(
x
)
{\displaystyle y(x)\!}
, is represented by the red line. This code can work for all n values.
In a seperate series of plots, compare the approximation of the function
log
(
x
+
1
)
{\displaystyle \log(x+1)\!}
by Taylor series expansion about
x
=
0
{\displaystyle x=0\!}
.
Where:
f
(
x
)
=
∑
n
=
0
∞
f
(
n
)
(
x
^
)
n
!
(
x
−
x
^
)
n
{\displaystyle f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}({\hat {x}})}{n!}}(x-{\hat {x}})^{n}\!}
For n=1:
log
(
x
+
1
)
=
x
log
(
10
)
{\displaystyle \log(x+1)={\frac {x}{\log(10)}}\!}
For n=2:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
{\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}\!}
For n=3:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
{\displaystyle \log(x+1)={\frac {x}{\log(10)}}-{\frac {x^{2}}{\log(10^{2})}}+{\frac {x^{3}}{\log(10^{3})}}\!}
For n=4:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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})}}\!}
−
x
12
log
(
10
12
)
{\displaystyle -{\frac {x^{12}}{\log(10^{12})}}\!}
For n=13:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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})}}\!}
−
x
12
log
(
10
12
)
+
x
13
log
(
10
13
)
{\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}\!}
For n=14:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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})}}\!}
−
x
12
log
(
10
12
)
+
x
13
log
(
10
13
)
−
x
14
log
(
10
14
)
{\displaystyle -{\frac {x^{12}}{\log(10^{12})}}+{\frac {x^{13}}{\log(10^{13})}}-{\frac {x^{14}}{\log(10^{14})}}\!}
For n=15:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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})}}\!}
−
x
12
log
(
10
12
)
+
x
13
log
(
10
13
)
−
x
14
log
(
10
14
)
+
x
15
log
(
10
15
)
{\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:
log
(
x
+
1
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
−
x
10
log
(
10
10
)
+
x
11
log
(
10
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})}}\!}
−
x
12
log
(
10
12
)
+
x
13
log
(
10
13
)
−
x
14
log
(
10
14
)
+
x
15
log
(
10
15
)
−
x
16
log
(
10
16
)
{\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:
Find
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
such that:
y
n
″
+
a
y
n
′
+
b
y
n
=
r
n
(
x
)
{\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
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
for n = 3, 6, 9, for x in
[
−
3
4
,
3
]
{\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.
First, we find the homogeneous solution to the ODE:
The characteristic equation is:
λ
2
−
3
λ
+
2
=
0
{\displaystyle \lambda ^{2}-3\lambda +2=0\!}
(
λ
−
2
)
(
λ
−
1
)
=
0
{\displaystyle (\lambda -2)(\lambda -1)=0\!}
Then,
λ
=
1
,
2
{\displaystyle \lambda =1,2\!}
Therefore the homogeneous solution is:
y
h
=
C
1
e
(
2
x
)
+
c
2
e
x
{\displaystyle y_{h}=C_{1}e^{(}2x)+c_{2}e^{x}\!}
Now to find the particulate solution
For n=3:
r
(
x
)
=
∑
0
n
−
(
−
1
)
n
x
n
n
ln
(
10
)
{\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}
r
(
x
)
=
x
ln
(
10
)
−
x
2
2
ln
(
10
)
+
x
3
3
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:
[
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
]
[
K
0
K
1
K
2
K
3
]
=
[
0
1
l
n
(
10
)
1
2
l
n
(
10
)
1
3
l
n
(
10
)
]
{\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
y
p
4
=
4.0444
+
3.7458
x
+
1.5743
x
2
+
0.3981
x
3
+
0.0543
x
4
{\displaystyle y_{p4}=4.0444+3.7458x+1.5743x^{2}+0.3981x^{3}+0.0543x^{4}\!}
Superposing the homogeneous and particulate solution we get
y
n
=
4.0444
+
3.7458
x
+
1.5743
x
2
+
0.3981
x
3
+
0.0543
x
4
+
C
1
e
2
x
+
C
2
e
x
{\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:
y
n
′
=
3.7458
+
3.1486
x
+
1.1943
x
2
+
0.2172
x
3
+
2
C
1
e
2
x
+
C
2
e
x
{\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:
y
(
−
0.75
)
=
0.9698261719
+
0.231301601
C
!
+
0.4723665527
C
2
=
1
{\displaystyle y(-0.75)=0.9698261719+0.231301601C_{!}+0.4723665527C_{2}=1\!}
y
′
(
−
0.75
)
=
1.9645125
+
0.4462603203
C
1
+
0.4723665527
C
2
=
0
{\displaystyle y'(-0.75)=1.9645125+0.4462603203C_{1}+0.4723665527C_{2}=0\!}
We obtain:
C
1
=
−
4.46
{\displaystyle C_{1}=-4.46\!}
C
2
=
0.055
{\displaystyle C_{2}=0.055\!}
Finally we have:
y
n
=
4.0444
+
3.7458
x
+
1.5743
x
2
+
0.3981
x
3
+
0.0543
x
4
−
4.46
e
2
x
+
0.055
e
x
{\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:
r
(
x
)
=
∑
0
n
−
(
−
1
)
n
x
n
n
ln
(
10
)
{\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}
r
(
x
)
=
x
ln
(
10
)
−
x
2
2
ln
(
10
)
+
x
3
3
ln
(
10
)
−
x
4
4
ln
(
10
)
+
x
5
5
ln
(
10
)
−
x
6
6
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:
[
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
]
[
K
0
K
1
K
2
K
3
K
4
K
5
K
6
]
[
0
1
l
n
(
10
)
1
2
l
n
(
10
)
1
3
l
n
(
10
)
1
4
l
n
(
10
)
1
5
l
n
(
10
)
1
6
l
n
(
10
)
]
{\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
y
p
7
=
377.4833
+
375.3933
x
+
185.6066
x
2
+
60.5479
x
3
+
14.4946
x
4
+
2.6492
x
5
+
0.3619
x
6
+
0.0310
x
7
{\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
y
n
=
377.4833
+
375.3933
x
+
185.6066
x
2
+
60.5479
x
3
+
14.4946
x
4
+
2.6492
x
5
+
0.3619
x
6
+
0.0310
x
7
+
C
1
e
2
x
+
c
2
e
x
{\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:
y
n
′
=
375.3933
+
371.213
x
+
181.644
x
2
+
57.9784
x
3
+
13.46
x
4
+
2.1714
x
5
+
0.214
x
6
+
2
C
1
e
2
x
+
C
2
e
x
{\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:
y
(
−
0.75
)
=
178.816
+
0.2231301601
C
!
+
0.4723665527
C
2
=
1
{\displaystyle y(-0.75)=178.816+0.2231301601C_{!}+0.4723665527C_{2}=1\!}
y
′
(
−
0.75
)
=
178.413
+
0.4462603203
C
1
+
0.4723665527
C
2
{\displaystyle y'(-0.75)=178.413+0.4462603203C_{1}+0.4723665527C_{2}\!}
We obtain:
C
1
=
−
2.6757
{\displaystyle C_{1}=-2.6757\!}
C
2
=
−
375.173
{\displaystyle C_{2}=-375.173\!}
Finally
y
n
=
377.4833
+
375.3933
x
+
185.6066
x
2
+
60.5479
x
3
+
14.4946
x
4
+
2.6492
x
5
+
0.3619
x
6
+
0.0310
x
7
+
−
2.6757
e
2
x
−
375.173
e
x
{\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:
r
(
x
)
=
∑
0
n
−
(
−
1
)
n
x
n
n
ln
(
10
)
{\displaystyle r(x)=\sum _{0}^{n}-{\frac {(-1)^{n}x^{n}}{n\ln(10)}}\!}
r
(
x
)
=
x
log
(
10
)
−
x
2
log
(
10
2
)
+
x
3
log
(
10
3
)
−
x
4
log
(
10
4
)
+
x
5
log
(
10
5
)
−
x
6
log
(
10
6
)
+
x
7
log
(
10
7
)
−
x
8
log
(
10
8
)
+
x
9
log
(
10
9
)
{\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:
[
K
0
K
1
K
2
K
3
K
4
K
5
K
6
K
7
K
8
K
9
]
=
[
0
1
l
n
(
10
)
1
2
l
n
(
10
)
1
3
l
n
(
10
)
1
4
l
n
(
10
)
1
5
l
n
(
10
)
1
6
l
n
(
10
)
1
7
l
n
(
10
)
1
8
l
n
(
10
)
1
9
l
n
(
10
)
]
{\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
y
p
11
=
1753158.594
+
1752673.419
x
+
875851.535
x
2
+
291627.134
x
3
+
72745.1129
x
4
+
14484.362
x
5
+
2392.510
x
6
+
335.632
x
7
+
40.417
x
8
{\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}\!}
+
4.1499
x
9
+
0.3474
x
(
10
)
+
0.0197
x
(
11
)
{\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)\!}
Superposing the homogeneous and particulate solution we get
y
n
=
1753158.594
+
1752673.419
x
+
875851.535
x
2
+
291627.134
x
3
+
72745.1129
x
4
+
14484.362
x
5
+
2392.510
x
6
+
335.632
x
7
+
40.417
x
8
{\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}\!}
+
4.1499
x
9
+
0.3474
x
(
10
)
+
0.0197
x
(
11
)
+
C
1
e
2
x
+
C
2
e
(
x
)
{\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)+C_{1}e^{2x}+C_{2}e^{(}x)\!}
Differentiating:
y
n
′
=
0.2167
x
1
0
+
3.474
x
9
+
37.3491
x
8
+
323.336
x
7
+
2349.42
x
6
+
14355.1
x
5
+
72421.8
x
4
+
290980.
x
3
+
874881.
x
2
{\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}\!}
+
1.7517
x
10
6
x
+
1.75267
x
10
6
+
2
C
1
e
2
x
+
C
2
e
x
{\displaystyle +1.7517x10^{6}x+1.75267x10^{6}+2C_{1}e^{2x}+C_{2}e^{x}\!}
Evaluating at the initial conditions:
y
(
−
0.75
)
=
828254
+
0.2231301601
C
!
+
0.4723665527
C
2
=
1
{\displaystyle y(-0.75)=828254+0.2231301601C_{!}+0.4723665527C_{2}=1\!}
y
′
(
−
0.75
)
=
828145
+
0.4462603203
C
1
+
0.4723665527
C
2
=
0
{\displaystyle y'(-0.75)=828145+0.4462603203C_{1}+0.4723665527C_{2}=0\!}
We obtain:
C
1
=
−
484.022
{\displaystyle C_{1}=-484.022\!}
C
2
=
−
1753750
{\displaystyle C_{2}=-1753750\!}
Finally
y
n
=
1753158.594
+
1752673.419
x
+
875851.535
x
2
+
291627.134
x
3
+
72745.1129
x
4
+
14484.362
x
5
+
2392.510
x
6
+
335.632
x
7
+
40.417
x
8
{\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}\!}
+
4.1499
x
9
+
0.3474
x
(
10
)
+
0.0197
x
(
11
)
−
484.022
e
2
x
−
1753750
e
x
{\displaystyle +4.1499x^{9}+0.3474x^{(}10)+0.0197x^{(}11)-484.022e^{2x}-1753750e^{x}\!}
Here is the graph for this problem using Matlab: