University of Florida/Egm4313/s12.team11.perez.gp/R5.9

From testwiki
Jump to navigation Jump to search

R5.9

Problem Statement

Consider the L2-ODE-CC (5) p.7b-7 with log(1+x) as excitation:

y3y+2y=r(x) (5) p.7b-7

r(x)=log(1+x) (1) p.7c-28

and the initial conditions

y(34)=1,y(34)=0.

Part 1

Project the excitation r(x) on the polynomial basis

bj(x)=xj,j=0,1,...,n (1)

i.e., find dj such that

r(x)rn(x)=j=0ndjxj (2)

for x in [34,3], and for n = 3, 6, 9.

Plot r(x) and rn(x) to show uniform approximation and convergence.

Note that:

xi,r=abxilog(1+x)dx (3)

Solution

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

Part 2

Find yn(x) such that:

yn+ayn+byn=rn(x) (1) p.7c-27

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

Plot yn(x) for n = 3, 6, 9, for x in [34,3].

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

Solution




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

General Binomial Theorem

(x+y)n=k=0n(nk)xnkyk

Solution

For n=0:

x0log(1+x)dx=log(1+x)dx

For substitution by parts, u=log(1+x),du=11+x,dv=dx,v=x

log(1+x)dx=xlog(1+x)x1+xdx

log(1+x)dx=xlog(1+x)(111+x)dx

log(1+x)dx=xlog(1+x)x+log(1+x)+C

Therefore:

                                     log(1+x)dx=(x+1)log(1+x)x+C

Using the General Binomial Theorem:

(x+y)0=k=00(0k)x0kyk=1

Therefore: (1)log(1+x)dx=log(1+x)dx

Which we have previously found that answer as:

                                     log(1+x)dx=(x+1)log(1+x)x+C




For n=1:

x1log(1+x)dx=xlog(1+x)dx

Initially we use the following substitutions: t=1+x,x=t1,dt=dx

xlog(1+x)dx=(t1)log(t)dt=(tlog(t)log(t))dt

First let us consider the first term: tlog(t)dt

Next, we use the integration by parts: u=logt,du=1tdt,dv=tdt,v=12t2
tlog(t)dt=12t2log(t)12t2(1tdt)

tlog(t)dt=12t2log(t)12tdt)

tlog(t)dt=12t2log(t)14t2

Next let us consider the second term: log(t)dt

Again, we will use integration by parts: u=logt,du=1tdt,dv=dt,v=t
tlog(t)dt=tlog(t)t(1tdt)

tlog(t)dt=tlog(t)dt

tlog(t)dt=tlog(t)t

Therefore:

(tlog(t)log(t))dt=12t2log(t)14t2(tlog(t)t)

(tlog(t)log(t))dt=12t2log(t)14t2tlog(t)+t

Re-substituting for t:

xlog(1+x)dx=12(1+x)2log(1+x)14(1+x)2(1+x)log(1+x)+(1+x)+C

xlog(1+x)dx=(1+x)(12(1+x)log(1+x)14(1+x)log(1+x)+1)+C

xlog(1+x)dx=(1+x)(12xlog(1+x)12log(1+x)14x+34)+C

Therefore:

                                     xlog(1+x)dx=(1+x)(12xlog(1+x)12log(1+x)14x+34)+C



Using the General Binomial Theorem for the integral with t substitution (t1)log(t)dt:

(x+y)1=(t+(1))1=(t+(1))=k=01(1k)x1kyk=k=01(1k)t1k(1)k=t1

Therefore: (t1)log(t)dt=xlog(1+x)dx

Which we have previously found that answer as:

                                     xlog(1+x)dx=(1+x)(12xlog(1+x)12log(1+x)14x+34)+C