Report 4
Intermediate Engineering Analysis
Section 7566
Team 11
Due date: March 14, 2012.
Obtain equations (2), (3), (n-2), (n-1), (n), and set up the matrix A as in (1) p.7-21
for the general case, with the matrix coefficients for rows 1, 2, 3, (n-2), (n-1), n, filled in,
as obtained from equations (1), (2), (3), (n-2), (n-1), (n).
As shown in p.7-21, the first equation is:
2
C
2
+
a
c
1
+
b
c
0
=
d
0
{\displaystyle 2C_{2}+ac_{1}+bc_{0}=d_{0}\!}
(1) p.7-21
According to p.7-20, the general form of the series is:
∑
j
=
0
n
−
2
[
c
j
+
2
(
j
+
2
)
(
j
+
1
)
+
a
c
j
+
1
+
b
c
j
]
x
j
+
a
c
n
n
x
n
−
1
+
b
[
c
n
−
1
x
n
−
1
+
c
n
x
n
]
=
∑
j
=
0
n
d
j
x
j
{\displaystyle \sum _{j=0}^{n-2}[c_{j+2}(j+2)(j+1)+ac_{j+1}+bc_{j}]x^{j}+ac_{n}nx^{n-1}+b[c_{n-1}x^{n-1}+c_{n}x^{n}]=\sum _{j=0}^{n}d_{j}x^{j}\!}
(2) p. 7-20
From (2) p.7-20, we can obtain n+1 equations for n+1 unknown coefficients
c
0
,
.
.
.
,
c
n
{\displaystyle {c_{0},...,c_{n}}\!}
.
After referring to p.7-22, it can be determined that the matrix to be set up is of the following form:
A
=
[
X
X
X
0
0
0
0
X
X
0
0
0
0
0
X
0
0
0
0
0
0
X
X
X
0
0
0
0
X
X
0
0
0
0
0
X
]
{\displaystyle A={\begin{bmatrix}X&&X&&X&&0&&0&0\\0&&X&&X&&0&&0&0\\0&&0&&X&&0&&0&0\\0&&0&&0&&X&&X&X\\0&&0&&0&&0&&X&X\\0&&0&&0&&0&&0&X\end{bmatrix}}\!}
where the rows signify the coefficients
c
0
,
c
1
,
c
2
,
c
n
−
2
,
c
n
−
1
,
c
n
{\displaystyle c_{0},c_{1},c_{2},c_{n-2},c_{n-1},c_{n}\!}
,
and the columns signify
d
0
,
d
1
,
d
2
,
d
n
−
2
,
d
n
−
1
,
d
n
{\displaystyle d_{0},d_{1},d_{2},d_{n-2},d_{n-1},d_{n}\!}
.
Building the coefficient matrix as shown in p.7-22 of the class notes, we can begin to solve for the coefficients
as follows:
Equation associated with
d
0
{\displaystyle d_{0}\!}
:
j=0:
d
0
=
2
C
2
+
a
c
1
+
b
c
0
{\displaystyle d_{0}=2C_{2}+ac_{1}+bc_{0}\!}
(1)
Equation associated with
d
1
{\displaystyle d_{1}\!}
:
j=1:
d
1
=
6
c
3
+
2
a
c
2
+
b
c
1
{\displaystyle d_{1}=6c_{3}+2ac_{2}+bc_{1}\!}
(2)
Equation associated with
d
2
{\displaystyle d_{2}\!}
:
j=2:
d
2
=
12
c
4
+
3
a
c
3
+
b
c
2
{\displaystyle d_{2}=12c_{4}+3ac_{3}+bc_{2}\!}
(3)
Equation associated with
d
n
−
2
{\displaystyle d_{n-2}\!}
:
j=n-2:
d
n
−
2
=
[
c
n
(
n
)
(
n
−
1
)
+
a
c
n
−
1
(
n
−
1
)
+
b
c
n
−
2
]
{\displaystyle d_{n-2}=[c_{n}(n)(n-1)+ac_{n-1}(n-1)+bc_{n-2}]\!}
(n-2)
Equation associated with
d
n
−
1
{\displaystyle d_{n-1}\!}
:
j=n-1:
d
n
−
1
=
a
c
n
n
+
b
c
n
−
1
{\displaystyle d_{n-1}=ac_{n}n+bc_{n-1}\!}
(n-1)
Equation associated with
d
n
{\displaystyle d_{n}\!}
:
j=n:
d
n
=
b
c
n
{\displaystyle d_{n}=bc_{n}\!}
(n)
Using all of the above equations, (1), (2), (3), (n-2), (n-1), (n), we can then determine the A matrix to be:
A
=
[
b
a
2
0
0
0
0
b
2
a
0
0
0
0
0
b
0
0
0
0
0
0
b
a
(
n
−
1
)
n
(
n
−
1
)
0
0
0
0
b
a
n
0
0
0
0
0
b
]
{\displaystyle A={\begin{bmatrix}b&&a&&2&&0&&0&0\\0&&b&&2a&&0&&0&0\\0&&0&&b&&0&&0&0\\0&&0&&0&&b&&a(n-1)&n(n-1)\\0&&0&&0&&0&&b&an\\0&&0&&0&&0&&0&b\end{bmatrix}}\!}
Solved by Gonzalo Perez
Solved by Jonathan Sheider
Given:
y
″
−
3
y
′
+
2
y
=
s
i
n
(
x
)
{\displaystyle y^{''}-3y^{'}+2y=sin(x)\!}
With initial conditions:
y
(
0
)
=
1
,
y
′
(
0
)
=
0
{\displaystyle y(0)=1,y'(0)=0\!}
Using the Taylor series for sin(x), reproduce the graph in the lecture notes p.7-24.
The Taylor series expansion for sin(x) that is plotted with n = 13 is as follows:
y
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
+
x
9
9
!
−
x
11
11
!
+
x
13
13
!
−
x
15
15
!
+
x
17
17
!
−
x
19
19
!
+
x
21
21
!
−
x
23
23
!
+
x
25
25
!
{\displaystyle y=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}+{\frac {x^{9}}{9!}}-{\frac {x^{11}}{11!}}+{\frac {x^{13}}{13!}}-{\frac {x^{15}}{15!}}+{\frac {x^{17}}{17!}}-{\frac {x^{19}}{19!}}+{\frac {x^{21}}{21!}}-{\frac {x^{23}}{23!}}+{\frac {x^{25}}{25!}}\!}
Using MatLab, the following Taylor series expansion was plotted and coded:
The plot created with n = 13 (i.e. 13 terms) is as follows:
Solved by Jonathan Sheider
Given:
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y^{''}-3y^{'}+2y=r(x)\!}
With initial conditions:
y
(
0
)
=
1
,
y
′
(
0
)
=
0
{\displaystyle y(0)=1,y'(0)=0\!}
Letting
r
(
x
)
{\displaystyle r(x)\!}
equal the truncated Taylor series of
s
i
n
(
x
)
{\displaystyle sin(x)\!}
, i.e.
r
(
x
)
=
∑
k
=
0
n
(
−
1
)
k
t
2
k
+
1
(
2
k
+
1
)
!
{\displaystyle r(x)=\sum _{k=0}^{n}{\frac {(-1)^{k}t^{2k+1}}{(2k+1)!}}\!}
Find the overall solution
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
for
n
=
3
,
5
,
9
{\displaystyle n=3,5,9\!}
and plot these solutions on the interval from
[
0
,
4
π
]
{\displaystyle [0,4\pi ]\!}
First finding the homogenous solution to the ODE:
The characteristic equation:
λ
2
−
3
λ
+
2
=
0
{\displaystyle \lambda ^{2}-3\lambda +2=0\!}
(
λ
−
2
)
(
λ
−
1
)
=
0
{\displaystyle (\lambda -2)(\lambda -1)=0\!}
Therefore,
λ
=
1
,
2
{\displaystyle \lambda =1,2\!}
And the homogenous solution is:
y
h
=
c
1
e
x
+
c
2
e
2
x
{\displaystyle y_{h}=c_{1}e^{x}+c_{2}e^{2x}\!}
Next the particular solution will be evaluated.
For n = 3:
The excitation is therefore:
r
x
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
{\displaystyle r_{x}=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}\!}
Therefore the particular solution has a form:
y
p
=
K
7
x
7
+
K
6
x
6
+
K
5
x
5
+
K
4
x
4
+
K
3
x
3
+
K
2
x
2
+
K
1
x
+
K
0
{\displaystyle y_{p}=K_{7}x^{7}+K_{6}x^{6}+K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0}\!}
Differentiating:
y
p
′
=
7
K
7
x
6
+
6
K
6
x
5
+
5
K
5
x
4
+
4
K
4
x
3
+
3
K
3
x
2
+
2
K
2
x
+
1
K
1
{\displaystyle y_{p}^{'}=7K_{7}x^{6}+6K_{6}x^{5}+5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+1K_{1}\!}
y
p
″
=
42
K
7
x
5
+
30
K
6
x
4
+
20
K
5
x
3
+
12
K
4
x
2
+
6
K
3
x
+
2
K
2
{\displaystyle y_{p}^{''}=42K_{7}x^{5}+30K_{6}x^{4}+20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}
Plugging these values into the ODE and equating them to the excitation:
42
K
7
x
5
+
30
K
6
x
4
+
20
K
5
x
3
+
12
K
4
x
2
+
6
K
3
x
+
2
K
2
{\displaystyle 42K_{7}x^{5}+30K_{6}x^{4}+20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}
−
3
(
7
K
7
x
6
+
6
K
6
x
5
+
5
K
5
x
4
+
4
K
4
x
3
+
3
K
3
x
2
+
2
K
2
x
+
1
K
1
)
{\displaystyle -3(7K_{7}x^{6}+6K_{6}x^{5}+5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+1K_{1})\!}
+
2
(
K
7
x
7
+
K
6
x
6
+
K
5
x
5
+
K
4
x
4
+
K
3
x
3
+
K
2
x
2
+
K
1
x
+
K
0
)
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
{\displaystyle +2(K_{7}x^{7}+K_{6}x^{6}+K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0})=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}\!}
42
K
7
x
5
+
30
K
6
x
4
+
20
K
5
x
3
+
12
K
4
x
2
+
6
K
3
x
+
2
K
2
{\displaystyle 42K_{7}x^{5}+30K_{6}x^{4}+20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}
−
21
K
7
x
6
−
18
K
6
x
5
−
15
K
5
x
4
−
12
K
4
x
3
−
9
K
3
x
2
−
6
K
2
x
−
3
K
1
{\displaystyle -21K_{7}x^{6}-18K_{6}x^{5}-15K_{5}x^{4}-12K_{4}x^{3}-9K_{3}x^{2}-6K_{2}x-3K_{1}\!}
+
2
K
7
x
7
+
2
K
6
x
6
+
2
K
5
x
5
+
2
K
4
x
4
+
2
K
3
x
3
+
2
K
2
x
2
+
2
K
1
x
+
2
K
0
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
{\displaystyle +2K_{7}x^{7}+2K_{6}x^{6}+2K_{5}x^{5}+2K_{4}x^{4}+2K_{3}x^{3}+2K_{2}x^{2}+2K_{1}x+2K_{0}=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}\!}
To solve this, we will use an upper triangular matrix, and solve using Matlab. The matrix is as follows:
[
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
K
7
]
=
[
0
1
0
−
1
3
!
0
1
5
!
0
−
1
7
!
]
{\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}\\K_{7}\end{bmatrix}}={\begin{bmatrix}0\\1\\0\\-{\frac {1}{3!}}\\0\\{\frac {1}{5!}}\\0\\-{\frac {1}{7!}}\end{bmatrix}}\!}
The answer is calculated in Matlab:
Therefore:
y
p
=
−
1
10080
x
7
+
−
1
960
x
6
+
−
1
320
x
5
+
−
1
128
x
4
+
−
19
192
x
3
+
−
51
128
x
2
+
−
51
128
x
+
−
51
256
{\displaystyle y_{p}={\frac {-1}{10080}}x^{7}+{\frac {-1}{960}}x^{6}+{\frac {-1}{320}}x^{5}+{\frac {-1}{128}}x^{4}+{\frac {-19}{192}}x^{3}+{\frac {-51}{128}}x^{2}+{\frac {-51}{128}}x+{\frac {-51}{256}}\!}
The final solution is then found to be:
y
n
=
c
1
e
x
+
c
2
e
2
x
+
−
1
10080
x
7
+
−
1
960
x
6
+
−
1
320
x
5
+
−
1
128
x
4
+
−
19
192
x
3
+
−
51
128
x
2
+
−
51
128
x
+
−
51
256
{\displaystyle y_{n}=c_{1}e^{x}+c_{2}e^{2x}+{\frac {-1}{10080}}x^{7}+{\frac {-1}{960}}x^{6}+{\frac {-1}{320}}x^{5}+{\frac {-1}{128}}x^{4}+{\frac {-19}{192}}x^{3}+{\frac {-51}{128}}x^{2}+{\frac {-51}{128}}x+{\frac {-51}{256}}\!}
Evaluating at the initial conditions, we have:
y
n
(
0
)
=
c
1
+
c
2
+
−
51
256
=
1
{\displaystyle y_{n}(0)=c_{1}+c_{2}+{\frac {-51}{256}}=1\!}
y
n
′
(
0
)
=
c
1
+
2
c
2
+
−
51
128
=
0
{\displaystyle y_{n}^{'}(0)=c_{1}+2c_{2}+{\frac {-51}{128}}=0\!}
Solving this system of equations, we find:
c
1
=
2
,
c
2
=
−
205
256
{\displaystyle c_{1}=2,c_{2}={\frac {-205}{256}}\!}
Therefore the final solution is:
y
n
=
2
e
x
+
−
205
256
e
2
x
+
−
1
10080
x
7
+
−
1
960
x
6
+
−
1
320
x
5
+
−
1
128
x
4
+
−
19
192
x
3
+
−
51
128
x
2
+
−
51
128
x
+
−
51
256
{\displaystyle y_{n}=2e^{x}+{\frac {-205}{256}}e^{2x}+{\frac {-1}{10080}}x^{7}+{\frac {-1}{960}}x^{6}+{\frac {-1}{320}}x^{5}+{\frac {-1}{128}}x^{4}+{\frac {-19}{192}}x^{3}+{\frac {-51}{128}}x^{2}+{\frac {-51}{128}}x+{\frac {-51}{256}}\!}
Plotting this equation in Matlab yields:
For n = 5:
The excitation is therefore:
r
x
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
+
x
9
9
!
−
x
11
11
!
{\displaystyle r_{x}=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}+{\frac {x^{9}}{9!}}-{\frac {x^{11}}{11!}}\!}
Therefore the particular solution has a form:
y
p
=
K
11
x
11
+
K
10
x
10
+
K
9
x
9
+
K
8
x
8
+
K
7
x
7
+
K
6
x
6
+
K
5
x
5
+
K
4
x
4
+
K
3
x
3
+
K
2
x
2
+
K
1
x
+
K
0
{\displaystyle y_{p}=K_{11}x^{11}+K_{10}x^{10}+K_{9}x^{9}+K_{8}x^{8}+K_{7}x^{7}+K_{6}x^{6}+K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0}\!}
Differentiating:
y
p
′
=
11
K
11
x
10
+
10
K
10
x
9
+
9
K
9
x
8
+
8
K
8
x
7
+
7
K
7
x
6
+
6
K
6
x
5
+
5
K
5
x
4
+
4
K
4
x
3
+
3
K
3
x
2
+
2
K
2
x
+
1
K
1
{\displaystyle y_{p}^{'}=11K_{11}x^{10}+10K_{10}x^{9}+9K_{9}x^{8}+8K_{8}x^{7}+7K_{7}x^{6}+6K_{6}x^{5}+5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+1K_{1}\!}
y
p
″
=
110
K
11
x
9
+
90
K
10
x
8
+
72
K
9
x
7
+
56
K
8
x
6
+
42
K
7
x
5
+
30
K
6
x
4
+
20
K
5
x
3
+
12
K
4
x
2
+
6
K
3
x
+
2
K
2
{\displaystyle y_{p}^{''}=110K_{11}x^{9}+90K_{10}x^{8}+72K_{9}x^{7}+56K_{8}x^{6}+42K_{7}x^{5}+30K_{6}x^{4}+20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}
Plugging these values into the ODE and equating them to the excitation, and then solving them by using a upper triangular matrix as before (just as in the n=3 example) in Matlab:
Therefore:
y
p
=
−
1
79833600
x
11
+
−
1
4838400
x
10
+
−
1
967680
x
9
+
−
1
215040
x
8
+
−
7
59419
x
7
+
−
17
15360
x
6
{\displaystyle y_{p}={\frac {-1}{79833600}}x^{11}+{\frac {-1}{4838400}}x^{10}+{\frac {-1}{967680}}x^{9}+{\frac {-1}{215040}}x^{8}+{\frac {-7}{59419}}x^{7}+{\frac {-17}{15360}}x^{6}\!}
+
−
17
5120
x
5
+
−
17
2048
x
4
+
−
307
3072
x
3
+
−
819
2048
x
2
+
−
819
2048
x
+
−
819
4096
{\displaystyle +{\frac {-17}{5120}}x^{5}+{\frac {-17}{2048}}x^{4}+{\frac {-307}{3072}}x^{3}+{\frac {-819}{2048}}x^{2}+{\frac {-819}{2048}}x+{\frac {-819}{4096}}\!}
The final solution is then found to be:
y
n
=
c
1
e
x
+
c
2
e
2
x
+
−
1
79833600
x
11
+
−
1
4838400
x
10
+
−
1
967680
x
9
+
−
1
215040
x
8
+
−
7
59419
x
7
+
−
17
15360
x
6
{\displaystyle y_{n}=c_{1}e^{x}+c_{2}e^{2x}+{\frac {-1}{79833600}}x^{11}+{\frac {-1}{4838400}}x^{10}+{\frac {-1}{967680}}x^{9}+{\frac {-1}{215040}}x^{8}+{\frac {-7}{59419}}x^{7}+{\frac {-17}{15360}}x^{6}\!}
+
−
17
5120
x
5
+
−
17
2048
x
4
+
−
307
3072
x
3
+
−
819
2048
x
2
+
−
819
2048
x
+
−
819
4096
{\displaystyle +{\frac {-17}{5120}}x^{5}+{\frac {-17}{2048}}x^{4}+{\frac {-307}{3072}}x^{3}+{\frac {-819}{2048}}x^{2}+{\frac {-819}{2048}}x+{\frac {-819}{4096}}\!}
Evaluating at the initial conditions, we have:
y
n
(
0
)
=
c
1
+
c
2
+
−
819
4096
=
1
{\displaystyle y_{n}(0)=c_{1}+c_{2}+{\frac {-819}{4096}}=1\!}
y
n
′
(
0
)
=
c
1
+
2
c
2
+
−
819
2048
=
0
{\displaystyle y_{n}^{'}(0)=c_{1}+2c_{2}+{\frac {-819}{2048}}=0\!}
Solving this system of equations, we find:
c
1
=
2
,
c
2
=
−
3277
4096
{\displaystyle c_{1}=2,c_{2}={\frac {-3277}{4096}}\!}
Therefore the final solution is:
y
n
=
2
e
x
+
−
3277
4096
e
2
x
+
−
1
79833600
x
11
+
−
1
4838400
x
10
+
−
1
967680
x
9
+
−
1
215040
x
8
+
−
7
59419
x
7
+
−
17
15360
x
6
{\displaystyle y_{n}=2e^{x}+{\frac {-3277}{4096}}e^{2x}+{\frac {-1}{79833600}}x^{11}+{\frac {-1}{4838400}}x^{10}+{\frac {-1}{967680}}x^{9}+{\frac {-1}{215040}}x^{8}+{\frac {-7}{59419}}x^{7}+{\frac {-17}{15360}}x^{6}\!}
+
−
17
5120
x
5
+
−
17
2048
x
4
+
−
307
3072
x
3
+
−
819
2048
x
2
+
−
819
2048
x
+
−
819
4096
{\displaystyle +{\frac {-17}{5120}}x^{5}+{\frac {-17}{2048}}x^{4}+{\frac {-307}{3072}}x^{3}+{\frac {-819}{2048}}x^{2}+{\frac {-819}{2048}}x+{\frac {-819}{4096}}\!}
Plotting this equation in Matlab yields:
For n = 9:
The excitation is therefore:
r
x
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
+
x
9
9
!
−
x
11
11
!
+
x
13
13
!
−
x
15
15
!
+
x
17
17
!
−
x
19
19
!
{\displaystyle r_{x}=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}+{\frac {x^{9}}{9!}}-{\frac {x^{11}}{11!}}+{\frac {x^{13}}{13!}}-{\frac {x^{15}}{15!}}+{\frac {x^{17}}{17!}}-{\frac {x^{19}}{19!}}\!}
Therefore the particular solution has a form:
y
p
=
K
19
x
19
+
K
18
x
18
+
K
17
x
17
+
K
16
x
16
+
K
15
x
15
+
K
14
x
14
+
K
13
x
13
+
K
12
x
12
+
K
11
x
11
+
K
10
x
10
{\displaystyle y_{p}=K_{19}x^{19}+K_{18}x^{18}+K_{17}x^{17}+K_{16}x^{16}+K_{15}x^{15}+K_{14}x^{14}+K_{13}x^{13}+K_{12}x^{12}+K_{11}x^{11}+K_{10}x^{10}\!}
+
K
9
x
9
+
K
8
x
8
+
K
7
x
7
+
K
6
x
6
+
K
5
x
5
+
K
4
x
4
+
K
3
x
3
+
K
2
x
2
+
K
1
x
+
K
0
{\displaystyle +K_{9}x^{9}+K_{8}x^{8}+K_{7}x^{7}+K_{6}x^{6}+K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0}\!}
Differentiating:
y
p
′
=
19
K
19
x
18
+
18
K
18
x
17
+
17
K
17
x
16
+
16
K
16
x
15
+
15
K
15
x
14
+
14
K
14
x
13
+
13
K
13
x
12
+
12
K
12
x
11
+
11
K
11
x
10
+
10
K
10
x
9
{\displaystyle y_{p}^{'}=19K_{19}x^{18}+18K_{18}x^{17}+17K_{17}x^{16}+16K_{16}x^{15}+15K_{15}x^{14}+14K_{14}x^{13}+13K_{13}x^{12}+12K_{12}x^{11}+11K_{11}x^{10}+10K_{10}x^{9}\!}
+
9
K
9
x
8
+
8
K
8
x
7
+
7
K
7
x
6
+
6
K
6
x
5
+
5
K
5
x
4
+
4
K
4
x
3
+
3
K
3
x
2
+
2
K
2
x
+
1
K
1
{\displaystyle +9K_{9}x^{8}+8K_{8}x^{7}+7K_{7}x^{6}+6K_{6}x^{5}+5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+1K_{1}\!}
y
p
″
=
342
K
19
x
17
+
306
K
18
x
16
+
272
K
17
x
15
+
240
K
16
x
14
+
210
K
15
x
13
+
182
K
14
x
12
+
156
K
13
x
11
+
132
K
12
x
10
+
110
K
11
x
9
+
90
K
10
x
8
{\displaystyle y_{p}^{''}=342K_{19}x^{17}+306K_{18}x^{16}+272K_{17}x^{15}+240K_{16}x^{14}+210K_{15}x^{13}+182K_{14}x^{12}+156K_{13}x^{11}+132K_{12}x^{10}+110K_{11}x^{9}+90K_{10}x^{8}\!}
+
72
K
9
x
7
+
56
K
8
x
6
+
42
K
7
x
5
+
30
K
6
x
4
+
20
K
5
x
3
+
12
K
4
x
2
+
6
K
3
x
+
2
K
2
{\displaystyle +72K_{9}x^{7}+56K_{8}x^{6}+42K_{7}x^{5}+30K_{6}x^{4}+20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}
Plugging these values into the ODE and equating them to the excitation, and then solving them by using an upper triangular matrix as before (just as in the n=3 example) in Matlab:
Therefore:
y
p
=
−
1
2.433
E
17
x
19
+
−
1
8.536
E
15
x
18
+
−
1
9.485
E
14
x
17
+
−
1
1.112
E
14
x
16
+
−
1
2.202
E
12
x
15
+
−
1
1.094
E
11
x
14
{\displaystyle y_{p}={\frac {-1}{2.433E17}}x^{19}+{\frac {-1}{8.536E15}}x^{18}+{\frac {-1}{9.485E14}}x^{17}+{\frac {-1}{1.112E14}}x^{16}+{\frac {-1}{2.202E12}}x^{15}+{\frac {-1}{1.094E11}}x^{14}\!}
+
−
1
1.563
E
10
x
13
+
−
1
2.404
E
9
x
12
+
−
1
6.657
E
7
x
11
+
−
1
4.537
E
6
x
10
+
−
1
9.074
E
5
x
9
+
−
4
8.066
E
5
x
8
+
−
38
3.192
E
5
x
7
{\displaystyle +{\frac {-1}{1.563E10}}x^{13}+{\frac {-1}{2.404E9}}x^{12}+{\frac {-1}{6.657E7}}x^{11}+{\frac {-1}{4.537E6}}x^{10}+{\frac {-1}{9.074E5}}x^{9}+{\frac {-4}{8.066E5}}x^{8}+{\frac {-38}{3.192E5}}x^{7}\!}
+
−
73
657010
x
6
+
−
218
65401
x
5
+
−
218
65401
x
4
+
−
3441
49157
x
3
+
−
1198
4061
x
2
+
−
1431
8177
x
+
145
4462
{\displaystyle +{\frac {-73}{657010}}x^{6}+{\frac {-218}{65401}}x^{5}+{\frac {-218}{65401}}x^{4}+{\frac {-3441}{49157}}x^{3}+{\frac {-1198}{4061}}x^{2}+{\frac {-1431}{8177}}x+{\frac {145}{4462}}\!}
The final solution is then found to be:
y
n
=
c
1
e
x
+
c
2
e
2
x
+
−
1
2.433
E
17
x
19
+
−
1
8.536
E
15
x
18
+
−
1
9.485
E
14
x
17
+
−
1
1.112
E
14
x
16
+
−
1
2.202
E
12
x
15
+
−
1
1.094
E
11
x
14
{\displaystyle y_{n}=c_{1}e^{x}+c_{2}e^{2x}+{\frac {-1}{2.433E17}}x^{19}+{\frac {-1}{8.536E15}}x^{18}+{\frac {-1}{9.485E14}}x^{17}+{\frac {-1}{1.112E14}}x^{16}+{\frac {-1}{2.202E12}}x^{15}+{\frac {-1}{1.094E11}}x^{14}\!}
+
−
1
1.563
E
10
x
13
+
−
1
2.404
E
9
x
12
+
−
1
6.657
E
7
x
11
+
−
1
4.537
E
6
x
10
+
−
1
9.074
E
5
x
9
+
−
4
8.066
E
5
x
8
+
−
38
3.192
E
5
x
7
{\displaystyle +{\frac {-1}{1.563E10}}x^{13}+{\frac {-1}{2.404E9}}x^{12}+{\frac {-1}{6.657E7}}x^{11}+{\frac {-1}{4.537E6}}x^{10}+{\frac {-1}{9.074E5}}x^{9}+{\frac {-4}{8.066E5}}x^{8}+{\frac {-38}{3.192E5}}x^{7}\!}
+
−
73
657010
x
6
+
−
218
65401
x
5
+
−
218
65401
x
4
+
−
3441
49157
x
3
+
−
1198
4061
x
2
+
−
1431
8177
x
+
145
4462
{\displaystyle +{\frac {-73}{657010}}x^{6}+{\frac {-218}{65401}}x^{5}+{\frac {-218}{65401}}x^{4}+{\frac {-3441}{49157}}x^{3}+{\frac {-1198}{4061}}x^{2}+{\frac {-1431}{8177}}x+{\frac {145}{4462}}\!}
Evaluating at the initial conditions, we have:
y
n
(
0
)
=
c
1
+
c
2
+
145
4462
=
1
{\displaystyle y_{n}(0)=c_{1}+c_{2}+{\frac {145}{4462}}=1\!}
y
n
′
(
0
)
=
c
1
+
2
c
2
+
−
1431
8177
=
0
{\displaystyle y_{n}^{'}(0)=c_{1}+2c_{2}+{\frac {-1431}{8177}}=0\!}
Solving this system of equations, we find:
c
1
=
1.76
,
c
2
=
−
0.7925
{\displaystyle c_{1}=1.76,c_{2}=-0.7925\!}
Therefore the final solution is:
y
n
=
1.76
e
x
+
−
0.7925
e
2
x
+
−
1
2.433
E
17
x
19
+
−
1
8.536
E
15
x
18
+
−
1
9.485
E
14
x
17
+
−
1
1.112
E
14
x
16
+
−
1
2.202
E
12
x
15
+
−
1
1.094
E
11
x
14
{\displaystyle y_{n}=1.76e^{x}+-0.7925e^{2x}+{\frac {-1}{2.433E17}}x^{19}+{\frac {-1}{8.536E15}}x^{18}+{\frac {-1}{9.485E14}}x^{17}+{\frac {-1}{1.112E14}}x^{16}+{\frac {-1}{2.202E12}}x^{15}+{\frac {-1}{1.094E11}}x^{14}\!}
+
−
1
1.563
E
10
x
13
+
−
1
2.404
E
9
x
12
+
−
1
6.657
E
7
x
11
+
−
1
4.537
E
6
x
10
+
−
1
9.074
E
5
x
9
+
−
4
8.066
E
5
x
8
+
−
38
3.192
E
5
x
7
{\displaystyle +{\frac {-1}{1.563E10}}x^{13}+{\frac {-1}{2.404E9}}x^{12}+{\frac {-1}{6.657E7}}x^{11}+{\frac {-1}{4.537E6}}x^{10}+{\frac {-1}{9.074E5}}x^{9}+{\frac {-4}{8.066E5}}x^{8}+{\frac {-38}{3.192E5}}x^{7}\!}
+
−
73
65701
x
6
+
−
218
65401
x
5
+
−
218
65401
x
4
+
−
3441
49157
x
3
+
−
1198
4061
x
2
+
−
1431
8177
x
+
145
4462
{\displaystyle +{\frac {-73}{65701}}x^{6}+{\frac {-218}{65401}}x^{5}+{\frac {-218}{65401}}x^{4}+{\frac {-3441}{49157}}x^{3}+{\frac {-1198}{4061}}x^{2}+{\frac {-1431}{8177}}x+{\frac {145}{4462}}\!}
Plotting this equation in Matlab yields:
Note: On the interval from
0
{\displaystyle 0\!}
to
4
π
{\displaystyle 4\pi \!}
, the resulting plots of the solutions, on such a large scale (note that the Y-axis is forced to be on the order of
10
10
{\displaystyle 10^{10}\!}
!) each plot looks almost exactly identical. It is not until you are able to zoom in a lot do you see the very slight change in the curve of each plot on this interval.
--Egm4313.s12.team11.sheider (talk ) 01:09, 14 March 2012 (UTC)
Solved by Daniel Suh
Using the particular solution from Table 2.1 on Kreyszig, find the overall solution
y
(
x
)
{\displaystyle y(x)\!}
, and plot it compared with
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
for n = 3,5,9
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y''-3y'+2y=r(x)\!}
r
(
x
)
=
s
i
n
(
x
)
{\displaystyle r(x)=sin(x)\!}
Initial Conditions:
y
(
0
)
=
1
{\displaystyle y(0)=1\!}
,
y
′
(
0
)
=
0
{\displaystyle y'(0)=0\!}
To find
y
h
(
x
)
{\displaystyle y_{h}(x)\!}
,
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y''-3y'+2y=r(x)\!}
λ
2
−
3
λ
+
2
=
0
{\displaystyle \lambda ^{2}-3\lambda +2=0\!}
(
λ
−
2
)
(
λ
−
1
)
=
0
{\displaystyle (\lambda -2)(\lambda -1)=0\!}
λ
1
=
2
,
λ
2
=
1
{\displaystyle \lambda _{1}=2,\lambda _{2}=1\!}
y
h
(
x
)
=
c
1
e
2
x
+
c
2
e
x
{\displaystyle y_{h}(x)=c_{1}e^{2x}+c_{2}e^{x}\!}
To find
y
p
(
x
)
{\displaystyle y_{p}(x)\!}
,
Using Table 2.1, we find that for
r
(
x
)
=
s
i
n
(
x
)
{\displaystyle r(x)=sin(x)\!}
,
y
p
=
K
c
o
s
(
ω
x
)
+
M
s
i
n
(
ω
x
)
{\displaystyle y_{p}=Kcos(\omega x)+Msin(\omega x)\!}
y
p
′
=
−
K
s
i
n
(
ω
x
)
+
M
c
o
s
(
ω
x
)
{\displaystyle y'_{p}=-Ksin(\omega x)+Mcos(\omega x)\!}
y
p
″
=
−
K
c
o
s
(
ω
x
)
−
M
s
i
n
(
ω
x
)
{\displaystyle y''_{p}=-Kcos(\omega x)-Msin(\omega x)\!}
Plugging it back into the equation,
(
−
K
c
o
s
(
x
)
−
M
s
i
n
(
x
)
)
−
3
(
−
K
s
i
n
(
x
)
+
M
c
o
s
(
x
)
)
+
2
(
K
c
o
s
(
x
)
+
M
s
i
n
(
x
)
)
=
s
i
n
(
x
)
{\displaystyle (-Kcos(x)-Msin(x))-3(-Ksin(x)+Mcos(x))+2(Kcos(x)+Msin(x))=sin(x)\!}
(
3
K
+
M
)
s
i
n
(
x
)
+
(
K
−
3
M
)
c
o
s
(
x
)
=
s
i
n
(
x
)
{\displaystyle (3K+M)sin(x)+(K-3M)cos(x)=sin(x)\!}
Solving for coefficients,
(
3
K
+
M
)
=
1
{\displaystyle (3K+M)=1\!}
(
K
−
3
M
)
=
0
{\displaystyle (K-3M)=0\!}
K
=
3
10
{\displaystyle K={\frac {3}{10}}\!}
M
=
1
10
{\displaystyle M={\frac {1}{10}}\!}
y
p
(
x
)
=
3
10
c
o
s
(
x
)
+
1
10
s
i
n
(
x
)
{\displaystyle y_{p}(x)={\frac {3}{10}}cos(x)+{\frac {1}{10}}sin(x)\!}
y
(
x
)
=
y
h
(
x
)
+
y
p
(
x
)
{\displaystyle y(x)=y_{h}(x)+y_{p}(x)\!}
y
(
x
)
=
c
1
e
2
x
+
c
2
e
x
+
3
10
c
o
s
(
x
)
+
1
10
s
i
n
(
x
)
{\displaystyle y(x)=c_{1}e^{2x}+c_{2}e^{x}+{\frac {3}{10}}cos(x)+{\frac {1}{10}}sin(x)\!}
Solving with initial conditions,
y
(
x
)
=
c
1
e
2
x
+
c
2
e
x
+
3
10
c
o
s
(
x
)
+
1
10
s
i
n
(
x
)
{\displaystyle y(x)=c_{1}e^{2x}+c_{2}e^{x}+{\frac {3}{10}}cos(x)+{\frac {1}{10}}sin(x)\!}
y
′
(
x
)
=
2
c
1
e
2
x
+
c
2
e
x
−
3
10
s
i
n
(
x
)
+
1
10
c
o
s
(
x
)
{\displaystyle y'(x)=2c_{1}e^{2x}+c_{2}e^{x}-{\frac {3}{10}}sin(x)+{\frac {1}{10}}cos(x)\!}
1
=
c
1
+
c
2
+
3
10
{\displaystyle 1=c_{1}+c_{2}+{\frac {3}{10}}\!}
0
=
2
c
1
+
c
2
+
1
10
{\displaystyle 0=2c_{1}+c_{2}+{\frac {1}{10}}\!}
c
1
=
−
4
5
{\displaystyle c_{1}={\frac {-4}{5}}\!}
c
2
=
3
2
{\displaystyle c_{2}={\frac {3}{2}}\!}
y
(
x
)
=
−
4
5
e
2
x
+
3
2
e
x
+
3
10
c
o
s
(
x
)
+
1
10
s
i
n
(
x
)
{\displaystyle y(x)={\frac {-4}{5}}e^{2x}+{\frac {3}{2}}e^{x}+{\frac {3}{10}}cos(x)+{\frac {1}{10}}sin(x)\!}
{\displaystyle \!}
Plotting in matlab yields:
As shown on the graph, the two plots are exactly the same.
Created by [Daniel Suh ] 20:43, 13 March 2012 (UTC)
Solved by Francisco Arrieta
Develop
log
(
x
+
1
)
{\displaystyle \log(x+1)\!}
in Taylor Series about
x
=
0
{\displaystyle x=0\!}
to reproduce the figure on page 7-25
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=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=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=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=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
--Egm4313.s12.team11.arrieta (talk ) 00:44, 14 March 2012 (UTC)
Solved by: --Egm4313.s12.team11.vargas.aa (talk ) 01:28, 14 March 2012 (UTC)
Given:
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y''-3y'+2y=r(x)\!}
where
r
(
x
)
=
log
(
1
+
x
)
{\displaystyle r(x)=\log(1+x)\!}
With initial conditions:
y
(
−
3
4
)
=
1
,
y
′
(
−
3
4
)
=
0
{\displaystyle y(-{\frac {3}{4}})=1,y'(-{\frac {3}{4}})=0\!}
Find the overall solution
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
for
n
=
4
,
7
,
11
{\displaystyle n=4,7,11\!}
and plot these solutions on the interval from
[
−
3
4
,
3
]
{\displaystyle [-{\frac {3}{4}},3]\!}
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=4
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
)
{\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)}}\!}
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
K
4
]
=
[
0
1
l
n
(
10
)
1
2
l
n
(
10
)
1
3
l
n
(
10
)
1
4
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}\\K_{4}\end{bmatrix}}={\begin{bmatrix}0\\{\frac {1}{ln(10)}}\\{\frac {1}{2ln(10)}}\\{\frac {1}{3ln(10)}}\\{\frac {1}{4ln(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
{\displaystyle y'(-0.75)=1.9645125+0.4462603203C_{1}+0.4723665527C_{2}\!}
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=7
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
)
+
x
7
7
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)}}+{\frac {x^{7}}{7\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
K
7
]
[
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
)
]
{\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}\\K_{7}\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)}}\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=11
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
)
+
x
7
7
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)}}+{\frac {x^{7}}{7\ln(10)}}\!}
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
K
10
K
11
]
=
[
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
)
1
10
l
n
(
10
)
1
11
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}\\K_{10}\\K_{11}\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)}}\\{\frac {1}{10ln(10)}}\\{\frac {1}{11ln(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}\!}
Plot for part 2 and part 3. Please note that because of the broad scale, it is almost impossible to distinguish between the graphs for n=4,7,11 nad the ODE45 operator. Only when zoomed in is there any noticeable difference
Find n sufficiently high so that
y
n
(
x
1
)
,
y
n
′
(
x
1
)
{\displaystyle y_{n}(x_{1}),y'_{n}(x_{1})}
do not differ from the numerical solution by more than
10
−
5
{\displaystyle 10^{-5}}
at
x
1
=
0.9
{\displaystyle x_{1}=0.9}
Using a program in MATLAB that iteratively added terms onto the taylor series of
l
o
g
(
1
+
x
)
{\displaystyle log(1+x)}
, terms were added until the error between the exact answer and the series was less than
10
−
5
{\displaystyle 10^{-5}}
.
It was found after trial and error that
n
=
39
{\displaystyle n=39}
for the error to be of a magnitude of
10
−
5
{\displaystyle 10^{-5}}
. This error found was
9.7422e-005
Similarly, for
y
n
′
(
x
1
)
{\displaystyle y'_{n}(x_{1})}
.
It was found after trial and error that
n
=
74
{\displaystyle n=74}
for the error to be of a magnitude of
10
−
5
{\displaystyle 10^{-5}}
. This error found was
9.3967e-005
Develop
l
o
g
(
1
+
x
)
{\displaystyle log(1+x)}
in Taylor series about
x
^
=
1
{\displaystyle {\hat {x}}=1}
for
n
=
4
,
7
,
11
{\displaystyle n=4,7,11}
and plot these truncated series vs. the exact function.
What is now the domain of convergence by observation?
A MATLAB program was created, which calculated the Taylor series of each n value, along with the exact function, then plotted these together to show the comparison of all the series.
Below is the Taylor series for
n
=
7
{\displaystyle n=7}
expanded at
x
^
=
1
{\displaystyle {\hat {x}}=1}
.
x
−
1
2
ln
(
10
)
−
(
x
−
1
)
2
8
ln
(
10
)
+
(
x
−
1
)
3
24
ln
(
10
)
−
(
x
−
1
)
4
64
ln
(
10
)
+
(
x
−
1
)
5
160
ln
(
10
)
−
(
x
−
1
)
6
384
ln
(
10
)
+
ln
(
2
)
ln
(
10
)
{\displaystyle {\frac {x-1}{2\,\ln \!\left(10\right)}}-{\frac {{\left(x-1\right)}^{2}}{8\,\ln \!\left(10\right)}}+{\frac {{\left(x-1\right)}^{3}}{24\,\ln \!\left(10\right)}}-{\frac {{\left(x-1\right)}^{4}}{64\,\ln \!\left(10\right)}}+{\frac {{\left(x-1\right)}^{5}}{160\,\ln \!\left(10\right)}}-{\frac {{\left(x-1\right)}^{6}}{384\,\ln \!\left(10\right)}}+{\frac {\ln \!\left(2\right)}{\ln \!\left(10\right)}}}
It can be seen by observation that the domain of convergence has shifted to the right one unit.
--egm4313.s12.team11.gooding (talk ) 03:48, 14 March 2012 (UTC)
Solved by Luca Imponenti
Find
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
, for
n
=
4
,
7
,
11
{\displaystyle n=4,7,11\!}
such that:
y
n
″
−
3
y
n
′
+
2
y
n
=
r
n
(
x
)
{\displaystyle y_{n}''-3y_{n}'+2y_{n}=r_{n}(x)\!}
for
x
{\displaystyle x\!}
in
[
0.9
,
3
]
{\displaystyle [0.9,3]\!}
with the initial conditions found.
Plot
y
n
(
x
)
{\displaystyle y_{n}(x)\!}
for
n
=
4
,
7
,
11
{\displaystyle n=4,7,11\!}
for
x
{\displaystyle x\!}
in
[
0.9
,
3
]
{\displaystyle [0.9,3]\!}
.
Homogeneous Solution
edit
The homogeneous case is shown below:
y
h
″
−
3
y
h
′
+
2
y
h
=
0
{\displaystyle y''_{h}-3y'_{h}+2y_{h}=0\!}
This equation has the following roots:
λ
1
=
1
,
λ
2
=
2
{\displaystyle \lambda _{1}=1,\lambda _{2}=2\!}
Which gives yields the homogeneous solution
y
h
=
c
1
e
x
+
c
2
e
2
x
{\displaystyle y_{h}=c_{1}e^{x}+c_{2}e^{2x}\!}
General Solution, n=4
edit
Using the taylor series approximation from earlier with
n
=
4
{\displaystyle n=4\!}
we have
r
4
(
x
)
=
l
o
g
(
2
)
+
(
x
−
1
)
2
l
n
(
10
)
−
(
x
−
1
)
2
8
l
n
(
10
)
+
(
x
−
1
)
3
24
l
n
(
10
)
−
(
x
−
1
)
4
64
l
n
(
10
)
{\displaystyle r_{4}(x)=log(2)+{\frac {(x-1)}{2ln(10)}}-{\frac {(x-1)^{2}}{8ln(10)}}+{\frac {(x-1)^{3}}{24ln(10)}}-{\frac {(x-1)^{4}}{64ln(10)}}\!}
We know the particular solution,
y
p
4
(
x
)
{\displaystyle y_{p4}(x)\!}
, ve will have this form:
y
p
4
(
x
)
=
a
4
(
x
−
1
)
4
+
a
3
(
x
−
1
)
3
+
a
2
(
x
−
1
)
2
+
a
1
(
x
−
1
)
+
a
0
{\displaystyle y_{p4}(x)=a_{4}(x-1)^{4}+a_{3}(x-1)^{3}+a_{2}(x-1)^{2}+a_{1}(x-1)+a_{0}\!}
taking the derivatives of this solution
y
p
4
′
(
x
)
=
d
d
x
y
p
4
(
x
)
=
4
a
4
(
x
−
1
)
3
+
3
a
3
(
x
−
1
)
2
+
2
a
2
(
x
−
1
)
+
a
1
{\displaystyle y'_{p4}(x)={\frac {d}{dx}}y_{p4}(x)=4a_{4}(x-1)^{3}+3a_{3}(x-1)^{2}+2a_{2}(x-1)+a_{1}\!}
and
y
p
4
″
(
x
)
=
d
d
x
y
p
4
′
(
x
)
=
12
a
4
(
x
−
1
)
3
+
6
a
3
(
x
−
1
)
2
+
2
a
2
{\displaystyle y''_{p4}(x)={\frac {d}{dx}}y'_{p4}(x)=12a_{4}(x-1)^{3}+6a_{3}(x-1)^{2}+2a_{2}\!}
Plugging the above equations into the original ODE yields the following matrix equation:
[
2
0
0
0
0
−
12
2
0
0
0
12
−
9
2
0
0
0
6
−
6
2
0
0
0
2
−
3
2
]
∗
[
a
4
a
3
a
2
a
1
a
0
]
=
[
−
1
64
l
n
(
10
)
1
24
l
n
(
10
)
−
1
8
l
n
(
10
)
1
2
l
n
(
10
)
l
o
g
(
2
)
]
{\displaystyle {\begin{bmatrix}2&0&0&0&0\\-12&2&0&0&0\\12&-9&2&0&0\\0&6&-6&2&0\\0&0&2&-3&2\end{bmatrix}}*{\begin{bmatrix}a_{4}\\a_{3}\\a_{2}\\a_{1}\\a_{0}\end{bmatrix}}={\begin{bmatrix}-{\frac {1}{64ln(10)}}\\{\frac {1}{24ln(10)}}\\-{\frac {1}{8ln(10)}}\\{\frac {1}{2ln(10)}}\\log(2)\end{bmatrix}}\!}
The unknown vector
a
{\displaystyle a\!}
can be easily solved by forward substitution,the following values were calculated in matlab:
a
4
=
−
.0034
,
a
3
=
−
.0113
,
a
2
=
−
.0577
,
a
1
=
−
.1624
,
a
0
=
.1624
{\displaystyle a_{4}=-.0034,a_{3}=-.0113,a_{2}=-.0577,a_{1}=-.1624,a_{0}=.1624\!}
So the particular solution
y
p
4
{\displaystyle y_{p4}\!}
is
y
p
4
=
0.1624
−
0.1624
∗
(
x
−
1
)
−
.0577
∗
(
x
−
1
)
2
−
.0113
∗
(
x
−
1
)
3
−
.0034
∗
(
x
−
1
)
4
{\displaystyle y_{p4}=0.1624-0.1624*(x-1)-.0577*(x-1)^{2}-.0113*(x-1)^{3}-.0034*(x-1)^{4}\!}
We can now find the general solution for n=4,
y
4
(
x
)
{\displaystyle y_{4}(x)\!}
.
y
4
(
x
)
=
y
h
(
x
)
+
y
p
4
(
x
)
{\displaystyle y_{4}(x)=y_{h}(x)+y_{p4}(x)\!}
y
4
(
x
)
=
c
1
e
x
+
c
2
e
2
x
+
0.1624
−
0.1624
∗
(
x
−
1
)
{\displaystyle y_{4}(x)=c_{1}e^{x}+c_{2}e^{2x}+0.1624-0.1624*(x-1)\!}
−
.0577
∗
(
x
−
1
)
2
−
.0113
∗
(
x
−
1
)
3
−
.0034
∗
(
x
−
1
)
4
{\displaystyle -.0577*(x-1)^{2}-.0113*(x-1)^{3}-.0034*(x-1)^{4}\!}
Solving using the initial conditions yields;
y
4
(
x
)
=
.0595
e
x
−
.0076
e
2
x
+
0.1624
−
0.1624
∗
(
x
−
1
)
{\displaystyle y_{4}(x)=.0595e^{x}-.0076e^{2x}+0.1624-0.1624*(x-1)\!}
−
.0577
∗
(
x
−
1
)
2
−
.0113
∗
(
x
−
1
)
3
−
.0034
∗
(
x
−
1
)
4
{\displaystyle -.0577*(x-1)^{2}-.0113*(x-1)^{3}-.0034*(x-1)^{4}\!}
General Solution, n=7
edit
Using the taylor series approximation from earlier with
n
=
7
{\displaystyle n=7\!}
we have
r
7
(
x
)
=
l
o
g
(
2
)
+
(
x
−
1
)
2
l
n
(
10
)
−
(
x
−
1
)
2
8
l
n
(
10
)
+
(
x
−
1
)
3
24
l
n
(
10
)
−
(
x
−
1
)
4
64
l
n
(
10
)
+
(
x
−
1
)
5
160
l
n
(
10
)
−
(
x
−
1
)
6
384
l
n
(
10
)
+
(
x
−
1
)
7
896
l
n
(
10
)
{\displaystyle r_{7}(x)=log(2)+{\frac {(x-1)}{2ln(10)}}-{\frac {(x-1)^{2}}{8ln(10)}}+{\frac {(x-1)^{3}}{24ln(10)}}-{\frac {(x-1)^{4}}{64ln(10)}}+{\frac {(x-1)^{5}}{160ln(10)}}-{\frac {(x-1)^{6}}{384ln(10)}}+{\frac {(x-1)^{7}}{896ln(10)}}\!}
In a similar fashion we construct a matrix equation for n=7:
[
2
0
0
0
0
0
0
0
−
21
2
0
0
0
0
0
0
42
−
18
2
0
0
0
0
0
0
30
−
15
2
0
0
0
0
0
0
20
−
12
2
0
0
0
0
0
0
12
−
9
2
0
0
0
0
0
0
6
−
6
2
0
0
0
0
0
0
2
−
3
2
]
∗
[
a
7
a
6
a
5
a
4
a
3
a
2
a
1
a
0
]
=
[
1
896
l
n
(
10
)
−
1
384
l
n
(
10
)
1
160
l
n
(
10
)
−
1
64
l
n
(
10
)
1
24
l
n
(
10
)
−
1
8
l
n
(
10
)
1
2
l
n
(
10
)
l
o
g
(
2
)
]
{\displaystyle {\begin{bmatrix}2&0&0&0&0&0&0&0\\-21&2&0&0&0&0&0&0\\42&-18&2&0&0&0&0&0\\0&30&-15&2&0&0&0&0\\0&0&20&-12&2&0&0&0\\0&0&0&12&-9&2&0&0\\0&0&0&0&6&-6&2&0\\0&0&0&0&0&2&-3&2\end{bmatrix}}*{\begin{bmatrix}a_{7}\\a_{6}\\a_{5}\\a_{4}\\a_{3}\\a_{2}\\a_{1}\\a_{0}\end{bmatrix}}={\begin{bmatrix}{\frac {1}{896ln(10)}}\\-{\frac {1}{384ln(10)}}\\{\frac {1}{160ln(10)}}\\-{\frac {1}{64ln(10)}}\\{\frac {1}{24ln(10)}}\\-{\frac {1}{8ln(10)}}\\{\frac {1}{2ln(10)}}\\log(2)\end{bmatrix}}\!}
Solving:
a
7
=
.0002
,
a
6
=
.0020
,
a
5
=
.0141
,
a
4
=
.0725
,
a
3
=
.3034
,
a
2
=
.9029
,
a
1
=
1.9072
,
a
0
=
2.1084
{\displaystyle a_{7}=.0002,a_{6}=.0020,a_{5}=.0141,a_{4}=.0725,a_{3}=.3034,a_{2}=.9029,a_{1}=1.9072,a_{0}=2.1084\!}
So the particular solution
y
p
7
{\displaystyle y_{p7}\!}
is
y
p
7
=
2.1084
+
1.9072
∗
(
x
−
1
)
+
.9029
∗
(
x
−
1
)
2
+
.3034
∗
(
x
−
1
)
3
+
.0725
∗
(
x
−
1
)
4
+
.0141
∗
(
x
−
1
)
5
+
.0020
∗
(
x
−
1
)
6
+
.0002
∗
(
x
−
1
)
7
{\displaystyle y_{p7}=2.1084+1.9072*(x-1)+.9029*(x-1)^{2}+.3034*(x-1)^{3}+.0725*(x-1)^{4}+.0141*(x-1)^{5}+.0020*(x-1)^{6}+.0002*(x-1)^{7}\!}
We can now find the general solution for n=7,
y
7
(
x
)
{\displaystyle y_{7}(x)\!}
.
y
7
(
x
)
=
y
h
(
x
)
+
y
p
7
(
x
)
{\displaystyle y_{7}(x)=y_{h}(x)+y_{p7}(x)\!}
y
7
(
x
)
=
c
1
e
x
+
c
2
e
2
x
+
2.1084
+
1.9072
∗
(
x
−
1
)
+
.9029
∗
(
x
−
1
)
2
+
{\displaystyle y_{7}(x)=c_{1}e^{x}+c_{2}e^{2x}+2.1084+1.9072*(x-1)+.9029*(x-1)^{2}+\!}
.3034
∗
(
x
−
1
)
3
+
.0725
∗
(
x
−
1
)
4
+
.0141
∗
(
x
−
1
)
5
+
.0020
∗
(
x
−
1
)
6
+
.0002
∗
(
x
−
1
)
7
{\displaystyle .3034*(x-1)^{3}+.0725*(x-1)^{4}+.0141*(x-1)^{5}+.0020*(x-1)^{6}+.0002*(x-1)^{7}\!}
Solving using our initial conditions yields
y
7
(
x
)
=
−
.7271
e
x
+
.0233
e
2
x
+
2.1084
+
1.9072
∗
(
x
−
1
)
+
{\displaystyle y_{7}(x)=-.7271e^{x}+.0233e^{2x}+2.1084+1.9072*(x-1)+\!}
.9029
∗
(
x
−
1
)
2
+
.3034
∗
(
x
−
1
)
3
+
.0725
∗
(
x
−
1
)
4
+
.0141
∗
(
x
−
1
)
5
+
{\displaystyle .9029*(x-1)^{2}+.3034*(x-1)^{3}+.0725*(x-1)^{4}+.0141*(x-1)^{5}+\!}
.0020
∗
(
x
−
1
)
6
+
.0002
∗
(
x
−
1
)
7
{\displaystyle .0020*(x-1)^{6}+.0002*(x-1)^{7}\!}
General Solution, n=11
edit
Using the taylor series approximation from earlier with
n
=
11
{\displaystyle n=11\!}
we have
r
11
(
x
)
=
l
o
g
(
2
)
+
(
x
−
1
)
2
l
n
(
10
)
−
(
x
−
1
)
2
8
l
n
(
10
)
+
(
x
−
1
)
3
24
l
n
(
10
)
−
(
x
−
1
)
4
64
l
n
(
10
)
+
(
x
−
1
)
5
160
l
n
(
10
)
−
(
x
−
1
)
6
384
l
n
(
10
)
+
{\displaystyle r_{11}(x)=log(2)+{\frac {(x-1)}{2ln(10)}}-{\frac {(x-1)^{2}}{8ln(10)}}+{\frac {(x-1)^{3}}{24ln(10)}}-{\frac {(x-1)^{4}}{64ln(10)}}+{\frac {(x-1)^{5}}{160ln(10)}}-{\frac {(x-1)^{6}}{384ln(10)}}+\!}
(
x
−
1
)
7
896
l
n
(
10
)
−
(
x
−
1
)
8
2048
l
n
(
10
)
+
(
x
−
1
)
9
4608
l
n
(
10
)
−
(
x
−
1
)
10
10240
l
n
(
10
)
+
(
x
−
1
)
11
22528
l
n
(
10
)
{\displaystyle {\frac {(x-1)^{7}}{896ln(10)}}-{\frac {(x-1)^{8}}{2048ln(10)}}+{\frac {(x-1)^{9}}{4608ln(10)}}-{\frac {(x-1)^{10}}{10240ln(10)}}+{\frac {(x-1)^{11}}{22528ln(10)}}\!}
Finally, we write out the matrix equation for n=11:
A
∗
[
a
11
a
10
a
9
a
8
a
7
a
6
a
5
a
4
a
3
a
2
a
1
a
0
]
=
[
1
22528
l
n
(
10
)
−
1
10240
l
n
(
10
)
1
4608
l
n
(
10
)
−
1
2048
l
n
(
10
)
1
896
l
n
(
10
)
−
1
384
l
n
(
10
)
1
160
l
n
(
10
)
−
1
64
l
n
(
10
)
1
24
l
n
(
10
)
−
1
8
l
n
(
10
)
1
2
l
n
(
10
)
l
o
g
(
2
)
]
{\displaystyle A*{\begin{bmatrix}a_{11}\\a_{10}\\a_{9}\\a_{8}\\a_{7}\\a_{6}\\a_{5}\\a_{4}\\a_{3}\\a_{2}\\a_{1}\\a_{0}\end{bmatrix}}={\begin{bmatrix}{\frac {1}{22528ln(10)}}\\-{\frac {1}{10240ln(10)}}\\{\frac {1}{4608ln(10)}}\\-{\frac {1}{2048ln(10)}}\\{\frac {1}{896ln(10)}}\\-{\frac {1}{384ln(10)}}\\{\frac {1}{160ln(10)}}\\-{\frac {1}{64ln(10)}}\\{\frac {1}{24ln(10)}}\\-{\frac {1}{8ln(10)}}\\{\frac {1}{2ln(10)}}\\log(2)\end{bmatrix}}\!}
Solving the system in matlab:
a
11
=
0
,
a
10
=
.0002
,
a
9
=
.0019
,
a
8
=
.0181
,
a
7
=
.15
,
a
6
=
1.0675
,
a
5
=
6.4597
,
{\displaystyle a_{11}=0,a_{10}=.0002,a_{9}=.0019,a_{8}=.0181,a_{7}=.15,a_{6}=1.0675,a_{5}=6.4597,\!}
a
4
=
32.4318
,
a
3
=
130.0033
,
a
2
=
390.3968
,
a
1
=
781.289
,
a
0
=
781.6873
{\displaystyle a_{4}=32.4318,a_{3}=130.0033,a_{2}=390.3968,a_{1}=781.289,a_{0}=781.6873\!}
So the particular solution
y
p
11
{\displaystyle y_{p11}\!}
is
y
p
11
=
781.6873
+
781.289
∗
(
x
−
1
)
+
390.3968
∗
(
x
−
1
)
2
+
130.0033
∗
(
x
−
1
)
3
+
32.4318
∗
(
x
−
1
)
4
+
{\displaystyle y_{p11}=781.6873+781.289*(x-1)+390.3968*(x-1)^{2}+130.0033*(x-1)^{3}+32.4318*(x-1)^{4}+\!}
6.4597
∗
(
x
−
1
)
5
+
1.0675
∗
(
x
−
1
)
6
+
.15
∗
(
x
−
1
)
7
+
.0181
∗
(
x
−
1
)
8
+
.0019
∗
(
x
−
1
)
9
+
.0002
∗
(
x
−
1
)
10
{\displaystyle 6.4597*(x-1)^{5}+1.0675*(x-1)^{6}+.15*(x-1)^{7}+.0181*(x-1)^{8}+.0019*(x-1)^{9}+.0002*(x-1)^{10}\!}
We can now find the general solution for n=11,
y
1
1
(
x
)
{\displaystyle y_{1}1(x)\!}
.
y
11
(
x
)
=
y
h
(
x
)
+
y
p
11
(
x
)
{\displaystyle y_{11}(x)=y_{h}(x)+y_{p11}(x)\!}
y
11
(
x
)
=
c
1
e
x
+
c
2
e
2
x
+
781.6873
+
781.289
∗
(
x
−
1
)
{\displaystyle y_{11}(x)=c_{1}e^{x}+c_{2}e^{2x}+781.6873+781.289*(x-1)\!}
+
390.3968
∗
(
x
−
1
)
2
+
130.0033
∗
(
x
−
1
)
3
+
32.4318
∗
(
x
−
1
)
4
{\displaystyle +390.3968*(x-1)^{2}+130.0033*(x-1)^{3}+32.4318*(x-1)^{4}\!}
6.4597
∗
(
x
−
1
)
5
+
1.0675
∗
(
x
−
1
)
6
+
.15
∗
(
x
−
1
)
7
+
.0181
∗
(
x
−
1
)
8
+
.0019
∗
(
x
−
1
)
9
+
.0002
∗
(
x
−
1
)
10
{\displaystyle 6.4597*(x-1)^{5}+1.0675*(x-1)^{6}+.15*(x-1)^{7}+.0181*(x-1)^{8}+.0019*(x-1)^{9}+.0002*(x-1)^{10}\!}
Solving using our initial conditions yields
y
11
(
x
)
=
−
287.5907
e
x
+
.05
e
2
x
+
781.6873
+
781.289
∗
(
x
−
1
)
{\displaystyle y_{11}(x)=-287.5907e^{x}+.05e^{2x}+781.6873+781.289*(x-1)\!}
+
390.3968
∗
(
x
−
1
)
2
+
130.0033
∗
(
x
−
1
)
3
+
32.4318
∗
(
x
−
1
)
4
{\displaystyle +390.3968*(x-1)^{2}+130.0033*(x-1)^{3}+32.4318*(x-1)^{4}\!}
6.4597
∗
(
x
−
1
)
5
+
1.0675
∗
(
x
−
1
)
6
+
{\displaystyle 6.4597*(x-1)^{5}+1.0675*(x-1)^{6}+\!}
.15
∗
(
x
−
1
)
7
+
.0181
∗
(
x
−
1
)
8
+
.0019
∗
(
x
−
1
)
9
+
.0002
∗
(
x
−
1
)
10
{\displaystyle .15*(x-1)^{7}+.0181*(x-1)^{8}+.0019*(x-1)^{9}+.0002*(x-1)^{10}\!}
y
4
{\displaystyle y_{4}\!}
shown in red
y
7
{\displaystyle y_{7}\!}
shown in blue
y
11
{\displaystyle y_{11}\!}
shown in green
Solved by Luca Imponenti
Use the matlab command ode45 to integrate numerically
y
″
−
3
y
′
+
2
y
=
r
(
x
)
{\displaystyle y''-3y'+2y=r(x)\!}
with
r
(
x
)
=
l
o
g
(
1
+
x
)
{\displaystyle r(x)=log(1+x)\!}
and the initial conditions from Part 3 to obtain the numerical solution for y(x).
Plot y(x) in the same figure as above.
The numerical solution calculated using the matlab ode45 command is shown below:
ans =
0.2788
0.2854
0.2923
0.2997
0.3074
0.3229
0.3401
0.3592
0.3804
0.4040
0.4302
0.4595
0.4921
0.5285
0.5691
0.6145
0.6651
0.7218
0.7850
0.8557
0.9346
1.0228
1.1213
1.2313
1.3542
1.4914
1.6445
1.8155
2.0063
2.2193
2.4569
2.7219
3.0175
3.3471
3.7146
4.1243
4.5809
5.0898
5.6568
6.2885
6.9921
7.3442
7.7142
8.1032
8.5119
Plotting the aboved vector of y-values,along with the results from earlier yields the following graph:
where the answer calculated in matlab is shown in yellow.
Egm4313.s12.team11.imponenti (talk ) 08:04, 14 March 2012 (UTC)