Consider the L2-ODE-CC (5) p.7b-7 with
as excitation:
(5) p.7b-7
(1) p.7c-28
and the initial conditions
.
Project the excitation
on the polynomial basis
(1)
i.e., find
such that
(2)
for x in
, and for n = 3, 6, 9.
Plot
and
to show uniform approximation and convergence.
Note that:
(3)
Using Matlab, this is the code that was used to produce the results:
Find
such that:
(1) p.7c-27
with the same initial conditions as in (2) p.7c-28.
Plot
for n = 3, 6, 9, for x in
.
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.
Using integration by parts, and then with the help of of
General Binomial Theorem
![{\displaystyle (x+y)^{n}=\sum _{k=0}^{n}{\binom {n}{k}}x^{n-k}y^{k}\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bb9e01c4b990d4f80eaa8d8f9b26fabc652ca912)
For
:
For substitution by parts,
![{\displaystyle \int log(1+x)dx=xlog(1+x)-\int (1-{\frac {1}{1+x}})dx\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4aff68e12cc3fa585bdef420da23a9d4666b6ca2)
![{\displaystyle \int log(1+x)dx=xlog(1+x)-x+log(1+x)+C\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a6cefebf891160381a44f89103c6227483652a1a)
Therefore:
Using the General Binomial Theorem:
![{\displaystyle (x+y)^{0}=\sum _{k=0}^{0}{\binom {0}{k}}x^{0-k}y^{k}=1\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2b864a9daf3877eb8ad3f6145350235c479cc8bc)
Therefore:
Which we have previously found that answer as:
For
:
Initially we use the following substitutions:
First let us consider the first term: ![{\displaystyle \int tlog(t)dt\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/325b2b73d5ce5b8282717fa4e6114537446f7bd5)
Next, we use the integration by parts:
![{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}t^{2}({\frac {1}{t}}dt)\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/815b8af76613153f28025d8be6566832b45f47c6)
![{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-\int {\frac {1}{2}}tdt)\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d9235473fbdc2b4dd04a81ea918299f20a33f46a)
![{\displaystyle \int tlog(t)dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bbdc0768a7b12a53951a21965def061f856f3cef)
Next let us consider the second term: ![{\displaystyle \int log(t)dt\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eb77bc6b5b8ab49f73422528d58a154ec8bfa7f9)
Again, we will use integration by parts:
![{\displaystyle \int tlog(t)dt=tlog(t)-\int t({\frac {1}{t}}dt)\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/368a0ec231066eb8e9a95f33ab963555031ab92a)
![{\displaystyle \int tlog(t)dt=tlog(t)-\int dt\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b105d4d72517668b2c117c0aa487f5c468f569f0)
![{\displaystyle \int tlog(t)dt=tlog(t)-t\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a5087880aff91b247330cd338f1215a3d5001bc2)
Therefore:
![{\displaystyle \int (tlog(t)-\log(t))dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}-(tlog(t)-t)\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/88e5d9d6bff19ee9c89b87e7385b185caef33b61)
![{\displaystyle \int (tlog(t)-\log(t))dt={\frac {1}{2}}t^{2}log(t)-{\frac {1}{4}}t^{2}-tlog(t)+t\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dcd49930e7b7e6d3b6707525281dc1dce64190a9)
Re-substituting for t:
![{\displaystyle \int xlog(1+x)dx={\frac {1}{2}}(1+x)^{2}log(1+x)-{\frac {1}{4}}(1+x)^{2}-(1+x)log(1+x)+(1+x)+C\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eaac8f2dbec5b73a7eb82f4233916175c685eab7)
![{\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\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ccc74d27f1df3b06a23f2edaea2436f2a301fbb0)
![{\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\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4dba911d163123a31b5cbb4d66f4070f4f4b3d07)
Therefore:
Using the General Binomial Theorem for the integral with t substitution
:
![{\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\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/025b748816d4bb31e3971506d664dde42d4d1b4e)
Therefore:
Which we have previously found that answer as: