User:Egm4313.s12.team8.colocar/R6.5

Problem Statement
$$ \displaystyle \text{Part 1. R4.2, p7c-26} $$ $$ \displaystyle y_n(x)=y_{h,n}(x)+y_{p,n}(x) $$ $$ \displaystyle \text{For each of n=3,5,9, redisplay the expressions for } $$ $$ \displaystyle \text{the 3 functions } y_{p,n}(x), y_{h,n}(x), y_n(x), \text{ and plot these } $$ $$ \displaystyle \text{3 functions separately over the interval } \left[ 0,20 \pi \right]. $$

$$ \displaystyle \text{Exact solution: } y(x) = y_h(x)+y_p(x) $$ $$ \displaystyle \text{Redisplay the expressions for } y_p(x), y_h(x), y(x) $$

$$ \displaystyle \text{Superpose each of the above plot with that of the}$$ $$ \displaystyle \text{exact solution.} $$

$$ \displaystyle \text{Part 2. R4.3, p7c-28} $$ $$ \displaystyle \text{Understand and run the TA's code to produce} $$ $$ \displaystyle \text{a similar plot, but over a larger interval } \left[ 0, 10 \right]. \text{ Do } $$ $$ \displaystyle \text{zoom-in plots about points } x = -0.5, 0, +0.5 \text{ and } $$ $$ \displaystyle \text{comment on the accuracy of different approximations.} $$

$$ \displaystyle \text{Part 3. R4.4, p7c-29} $$ $$ \displaystyle \text{Understand and run the TA's code to produce} $$ $$ \displaystyle \text{a similar plot, but over a larger interval } \left[ 0.9, 10 \right], \text{ and } $$ $$ \displaystyle \text{for } n=4,7. \text{ Do zoom-in plots about } x = 1, 1.5, 2, 2.5 $$ $$ \displaystyle \text{and comment on the accurace of the approximations.} $$

Solution
$$ \displaystyle \text{Part 1.}$$

$$ \displaystyle \text{n = 3} $$ $$ \displaystyle \text{Particular solution: } $$ $$ \displaystyle y_{p,3}(x)=-9.9206*10^{-5}x^7-0.0010x^6-0.0031x^5-0.0078x^4 \cdots $$ $$ \displaystyle -0.0990x^3-0.3984x^2-0.3984x-0.1992 $$

$$ \displaystyle \text{Homogeneous solution: } $$ $$ \displaystyle y_{h,3}(x)=2e^x-0.8008e^{2x} $$

$$ \displaystyle \text{General solution: } $$ $$ \displaystyle y_{3}(x)=2e^x-0.8008e^{2x}-9.9206*10^{-5}x^7-0.0010x^6-0.0031x^5 \cdots $$ $$ \displaystyle -0.0078x^4-0.0990x^3-0.3984x^2-0.3984x-0.1992 $$

$$ \displaystyle \text{n = 5} $$ $$ \displaystyle \text{Particular solution: } $$ $$ \displaystyle y_{p,5}(x)=-1.2526*10^{-8}x^{11}-2.0668*10^{-7}x^{10}-1.0334*10^{-6}x^9 \cdots $$ $$ \displaystyle -4.6503*10^{-6}x^8-1.1781*10^{-4}x^7-0.0011x^6-0.0033x^5 \cdots $$ $$ \displaystyle -0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.2000 $$

$$ \displaystyle \text{Homogeneous solution: } $$ $$ \displaystyle y_{h,5}(x)=2.0001e^x-0.8001e^{2x} $$

$$ \displaystyle \text{General solution: } $$ $$ \displaystyle y_{5}(x)=2.0001e^x-0.8001e^{2x}-1.2526*10^{-8}x^{11}-2.0668*10^{-7}x^{10} \cdots $$ $$ \displaystyle -1.0334*10^{-6}x^9-4.6503*10^{-6}x^8-1.1781*10^{-4}x^7-0.0011x^6 \cdots $$ $$ \displaystyle -0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.2000 $$

$$ \displaystyle \text{n = 9} $$ $$ \displaystyle \text{Particular solution: } $$ $$ \displaystyle y_{p,9}(x)=-4.1103*10^{-18}x^{19}-1.1714*10^{-16}x^{18}-1.0543*10^{-15}x^{17} \cdots $$ $$ \displaystyle -8.9615*10^{-15}x^{16}-4.5405*10^{-13}x^{15}-9.1408*10^{-12}x^{14} \cdots $$ $$ \displaystyle -6.3985*10^{-11}x^{13}-4.1590*10^{-10}x^{12}-1.5021*10^{-8}x^{11} \cdots $$ $$ \displaystyle -2.2040*10^{-7}x^{10}-1.1020*10^{-6}x^{9}-4.9591*10^{-6}x^{8} \cdots $$ $$ \displaystyle -1.1904*10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4 \cdots $$ $$ \displaystyle -0.1000x^3-0.4000x^2-0.4000x-0.2000 $$

$$ \displaystyle \text{Homogeneous solution: } $$ $$ \displaystyle y_{h,9}(x)=2e^x-0.8e^{2x} $$

$$ \displaystyle \text{General solution: } $$ $$ \displaystyle y_{9}(x)=2e^x-0.8e^{2x}-4.1103*10^{-18}x^{19}-1.1714*10^{-16}x^{18} \cdots $$ $$ \displaystyle -1.0543*10^{-15}x^{17}-8.9615*10^{-15}x^{16}-4.5405*10^{-13}x^{15} \cdots $$ $$ \displaystyle -9.1408*10^{-12}x^{14}-6.3985*10^{-11}x^{13}-4.1590*10^{-10}x^{12} \cdots $$ $$ \displaystyle -1.5021*10^{-8}x^{11}-2.2040*10^{-7}x^{10}-1.1020*10^{-6}x^{9} \cdots $$ $$ \displaystyle -4.9591*10^{-6}x^{8}-1.1904*10^{-4}x^7-0.0011x^6 \cdots $$ $$ \displaystyle -0.0033x^5-0.0083x^4-0.1000x^3-0.4000x^2-0.4000x-0.2000 \cdots $$

$$ \displaystyle \text{Exact Overall solution: } $$ $$ \displaystyle y(x)=1.5e^x-0.8e^{2x}+0.3 \cos x+0.1 \sin x $$

$$ \displaystyle \text{Part 2.}$$ $$ \displaystyle \text{The following plot displays the Taylor series of } log(1+x) $$ $$ \displaystyle \text{ about } \hat{x} = 0.$$

$$ \displaystyle \text{The zoom-in about } x = -0.5 \text{ is displayed below. Here, we can}$$ $$ \displaystyle \text{see the plot broken, showing the inaccuracy beyond this point. }$$



$$ \displaystyle \text{The zoom-in about } x = 0 \text{ is displayed below. Here, we can}$$ $$ \displaystyle \text{see that the plot is very exact, displaying the accuracy at x = 0.}$$

$$ \displaystyle \text{The zoom-in about } x = 0.5 \text{ is displayed below. Here, we can}$$ $$ \displaystyle \text{see that the plot has begun to veer off the exact solution.}$$



$$ \displaystyle \text{Part 3.}$$ $$ \displaystyle \text{The following plot displays the Taylor series of } log(1+x) $$ $$ \displaystyle \text{ about } \hat{x} = 1.$$

$$ \displaystyle \text{The zoom-in about } x = 1 \text{ is displayed below. }$$



$$ \displaystyle \text{The zoom-in about } x = 1.5 \text{ is displayed below. }$$



$$ \displaystyle \text{The zoom-in about } x = 2 \text{ is displayed below. }$$

$$ \displaystyle \text{The zoom-in about } x = 2.5 \text{ is displayed below. }$$

$$ \displaystyle \text{It is noted that the plots begin to diverge from the exact}$$ $$ \displaystyle \text{solution beginning (ever so slightly) at x = 1. }$$