4.1 HW 1

  4.1.1 Problems listing
  4.1.2 Problem 1.6.1
  4.1.3 Problem 2
  4.1.4 Problem 3
  4.1.5 Problem 4
  4.1.6 key solution for HW 1

4.1.1 Problems listing

PDF

PDF (letter size)
PDF (legal size)

4.1.2 Problem 1.6.1

Expand the function f(x)=sin(x)cosh(x)+2 in Taylor series around the origin going up to x3. Calculate f(0.1) from this series and compare to the exact answer obtained by using a calculator

Solution

The Taylor series of function f(x) around origin is given by (1.3.16) ( is used throughout this HW to mean that the left side is the Taylor series approximation of f(x)).f(x)n=0xnn!f(n)(0) Where f(n)(0) is the nth derivative of f(x) evaluated at x=0.

For n=0, f(0)(x)=f(x)=sin(x)cosh(x)+2, therefore f(0)=0.

For n=1 f(1)(x)=ddx(sin(x)cosh(x)+2)=cos(x)(cosh(x)+2)sin(x)sinh(x)(cosh(x)+2)2=cos(x)(cosh(x)+2)(cosh(x)+2)2sin(x)sinh(x)(cosh(x)+2)2=cos(x)cosh(x)+2sin(x)sinh(x)(cosh(x)+2)2

The above evaluated at x=0 becomes f(1)(0)=11+20(1+2)2=13

For n=2 f(2)(x)=ddx(ddx(sin(x)cosh(x)+2))=ddx(cos(x)cosh(x)+2sin(x)sinh(x)(cosh(x)+2)2)=sin(x)(cosh(x)+2)cos(x)sinh(x)(cosh(x)+2)2(cos(x)sinh(x)+sin(x)cosh(x))(cosh(x)+2)2sin(x)sinh(x)(2(cosh(x)+2)sinh(x))(cosh(x)+2)4=sin(x)(cosh(x)+2)(cosh(x)+2)2cos(x)sinh(x)(cosh(x)+2)2cos(x)sinh(x)(cosh(x)+2)2(cosh(x)+2)4sin(x)cosh(x)(cosh(x)+2)2(cosh(x)+2)4+sin(x)sinh(x)(2(cosh(x)+2)sinh(x))(cosh(x)+2)4=sin(x)cosh(x)+2cos(x)sinh(x)(cosh(x)+2)2cos(x)sinh(x)(cosh(x)+2)2sin(x)cosh(x)(cosh(x)+2)2+2sin(x)sinh(x)sinh(x)(cosh(x)+2)3=sin(x)cosh(x)+22cos(x)sinh(x)(cosh(x)+2)2sin(x)cosh(x)(cosh(x)+2)2+2sin(x)sinh2(x)(cosh(x)+2)3

The above evaluated at x=0 becomesf(2)(0)=01+220(1+2)20(1+2)2+0(1+2)3=0

For n=3 f(3)(x)=ddx(d2dx2(sin(x)cosh(x)+2))=ddx(sin(x)cosh(x)+22cos(x)sinh(x)(cosh(x)+2)2sin(x)cosh(x)(cosh(x)+2)2+2sin(x)sinh2(x)(cosh(x)+2)3)=cos(x)(cosh(x)+2)+sin(x)sinh(x)(cosh(x)+2)22(sin(x)sinh(x)+cos(x)cosh(x))(cosh(x)+2)2cos(x)sinh(x)(2(cosh(x)+2)sinh(x))(cosh(x)+2)4(cos(x)cosh(x)+sin(x)sinh(x))(cosh(x)+2)2sin(x)cosh(x)(2(cosh(x)+2)sinh(x))(cosh(x)+2)4+2(cos(x)sinh2(x)+2sin(x)cosh(x))(cosh(x)+2)3(sin(x)sinh2(x))(3(cosh(x)+2)2sinh(x))(cosh(x)+2)6

The above evaluated at x=0 givesf(3)(0)=1(1+2)+0(1+2)22(0+1)(1+2)20(1+2)4(1+0)(1+2)20(1+2)4+2(0+0)(1+2)3(0)(3(1+2)20)(1+2)6=(3)(3)22(1)(3)2(3)4(1)(3)2(3)4+20(3)6=132132132=23

The process stops here, because the problem is asking for n=3.  Substituting all the derivatives f(n)(0) values above intof(x)n=0xnn!f(n)(0) For up to n=3 gives the followingf(x)f(0)+xf(1)(0)+x22f(2)(0)+x33!f(3)(0)+0+x13+x22(0)+x33!(23)x1323x36x3x39

When x=110 the above becomesfn=3(110)1301(1000)913019000300190002999000

From the calculator29990000.0332222 And from the exact expression sin(x)cosh(x)+2=sin(0.1)cosh(0.1)+2=0.0332224

The error is about 1.67×107.

4.1.3 Problem 2

   4.1.3.1 Case p=13
   4.1.3.2 Case p=2

Consider f(x)=(1+x)p for (a) p=13 and (b) p=2, respectively.  (1) Find the Taylor series of f(x) around x=0. (2) From the form of the general term, find the interval of convergence of the series. (3) How many terms in the series do you need to estimate f(0.1) to within 1% ? Check that the difference between your estimate and the actual result has approximately the same magnitude as the next term in the series.

Solution

4.1.3.1 Case p=13

f(x)=(1+x)13 Part (1) The Taylor series is given by (1)f(x)f(0)+xf(0)+x22!f(x)+x33!f(x)+ Where f(0)=1 and f(x)=13(1+x)23. Hence f(0)=13 and f(x)=13(23)(1+x)53. Hence f(0)=(2)32, and f(x)=13(23)(53)(1+x)83, hence f(0)=13(23)(53)=(2)(5)33, and f(4)(x)=13(23)(53)(83)(1+x)113, hence f(4)(0)=13(23)(53)(83)=134((2)(5)(8)) and on. The series in (1) becomesf(x)1+13x(2)32x22!+(2)(5)33x33!(2)(5)(8)34x44!+(2)(5)(8)(11)35x55!(2)(5)(8)(11)(14)36x66!(2)1+13x132x2+534x31035x4+2236x515438x6+

The general term is found by comparing the above to the general term obtained from binomial expansion. Since (3)(1+x)p=(p0)x0+(p1)x+(p2)x2+ Comparing (2,3) shows that the general term is the binomial coefficient (13n). Therefore the Taylor series for (1+x)13 can be written asf(x)n=0(pn)xn For p=13 the above becomesf(x)n=0(13n)xn Part(2) R=limn|anan+1|=limn|(pn)(pn+1)|

The Binomial coefficient (pn)=p!n!(pn)!, for when p is integer. This is not the case here. For non-integer p The Binomial coefficient becomes (pn)=Γ(p+1)Γ(n+1)Γ(pn+1) where Γ(p) is the Gamma function. The above ratio now becomesR=limn|Γ(p+1)Γ(n+1)Γ(pn+1)Γ(p+1)Γ(n+2)Γ(pn)|=limn|Γ(n+2)Γ(pn)Γ(n+1)Γ(pn+1)|=limn|nΓ(pn)Γ(pn+1)|=limn|npn|

But p=13, hence the above becomesR=limn|n13n|=limn|nn13|=1

Therefore the radius of convergence is 1. This means the Taylor series found above converges to f(x) for |x|<1.

Part 3

f(x)=(1+x)13 When x=0.1 f(0.1)=(1.1)13=1.032280115

one percent of the above is 1100(1.032280115)=0.01032280115 The value n is now found such that|Rn(x)|M(0.1)n+1(n+1)!0.01032280115 Where Rn(x) is the Taylor series remainder using n terms.  M is the upper bound for the n+1 derivative of f(x) any where between [0,0.1]. Instead of trying to find M, few calculations are used to find how many terms are needed.

For n=0, f~(0.1)=1 and the error is 1.0322801151=032280115.

For n=1, f~(0.1)=1+(131)0.1=1.0333333, and the error is |1.0322801151.0333333|=0.001053218. Because this is smaller than Rn(x) then only two terms are needed in the Taylor series to obtained the required accuracy. Thereforef(x)1+13x

4.1.3.2 Case p=2

f(x)=(1+x)2 Part (1) The Taylor series is f(x)f(0)+xf(0)+x22!f(x)+x33!f(x)+ But f(0)=1 and f(x)=(2)(1+x)3. Hence f(0)=2 and f(x)=(2)(3)(1+x)4. Hence f(0)=(2)(3), and f(x)=2(3)(4)(1+x)5, hence f(0)=(2)(3)(4)(5) and so on. The above becomesf(x)1+(2)x(2)(3)x22!+(2)(3)(4)x33!+12x+(2)(3)x22!(2)(3)(4)x33!+12x+3x24x3+

The general term is thereforef(x)n=0(1)n(n+1)xn Part(2) R=limn|anan+1|=limn|(n+1)(n+2)|=1

Hence the series converges to f(x) for |x|<1.

Part 3

f(x)=(1+x)2 For x=0.1 f(0.1)=(1.1)2=11.12=0.82644628

One percent of the above is 1100(0.8264462810)=0.0082644628 The value n is now found such that|Rn(x)|M(0.1)n+1(n+1)!0.0082644628 Where Rn(x) is the Taylor series remainder using n terms.  M is the upper bound for the n+1 derivative of f(x) any where between [0,0.1]. Doing few calculations gives

For n=0, f~(0.1)=1, the error is |0.826446281|=0.1735537190.

For n=1, f~(0.1)=0.8, the error is |0.826446280.8|=0.02644628.

For n=2, f~(0.1)=0.83, the error is |0.826446280.83|=0.0035537190. Because this is within 1% then only three terms are needed. Thereforef(x)12x+3x2

4.1.4 Problem 3

   4.1.4.1 Part a
   4.1.4.2 Part b

Expand f(x)=tan(x2) to order x6 using (a) direct Taylor expansion. (b) The Taylor series for sin(x) and cosx with appropriate substitution.

Solution

4.1.4.1 Part a

Using Taylor seriesf(x)n=0xnn!f(n)(0) Where f(x)=tan(x2) and the expansion is around x=0. The Taylor series for f(u)=tan(u) is found instead of tan(x2), and then at the end u is replaced by x2. This is called the substitution method. This simplifies the derivations. Therefore f(0)=0. The first derivative isf(u)=ddutan(u)=ddu(sinucosu)=cos2u+cos2ucos2u=1cos2u

At u=0 this gives f(0)=1.

The next derivative using the above result givesf(u)=ddu(1cos2u)=2cosusinucos4u=2sinucos3u

At u=0 this gives f(2)(0)=0. The next derivative givesf(3)(u)=2ddu(sinucos3u)=2cosucos3usinu(3cos2u(sinu))cos6u=2cos4u+3sin2ucos2ucos6u=2cos4ucos6u+6sin2ucos2ucos6u=2cos2u+6sin2ucos4u=2cos2u+6(1cos2u)cos4u=2cos2u+6cos4u6cos2u=4cos2u+6cos4u

At u=0 this gives f(3)(0)=41+61=2. Since the problem is asking for order x6 the process stops here, as this is the same as order u3 when u is replaced by x2.

Therefore the Taylor series for tan(u) is (for up to n=3)f(u)f(0)+uf(0)+u22!f(2)(0)+u33!f(3)(0)+0+u+0+2u33!u+13u3

Replacing u=x2, gives the Taylor series for tan(x2) for up to x6 term as tan(x2)x2+13x6

4.1.4.2 Part b

To obtain the above result using the Taylor series for sin(x2),cos(x2), the Taylor series for sin(x2) and cos(x2) is found, and long division is applied using the definition of tan(x2)=sin(x2)cos(x2). Terms with order larger than x6 are ignored. The Taylor series for sin(x) issin(x)xx33!+x55! Using the substitution method, the Taylor series for sin(x2) becomessin(x2)x2x63!+x105!(1)x2x66+x10120

The Taylor series for cos(x) iscos(x)1x22!+x44! Using the substitution method, the Taylor series for cos(x2) becomes cos(x2)1x42!+x84!(2)1x42+x824

Since tan(x2)=sin(x2)cos(x2) then the Taylor series for tan(x2) istan(x2)x2x63!+x105!1x42!+x84! Performing long division and stopping when the remainder has powers larger than x6 givestan(x2)x2+13x6+ Which is same result as part(a).

pict
Figure 4.1:Polynomals long division

4.1.5 Problem 4

   4.1.5.1 Part a
   4.1.5.2 Part b
   4.1.5.3 Part c
   4.1.5.4 Appendix

A particle of mass m moves along the +x axis (i.e. x>0) with potential energyV(x)=a2x2bx Where a and b are positive parameters. (a) Find the equilibrium position x0. (b) Show that the particle executes harmonic oscillations near x=x0. (c) Find the angular frequency of oscillations.

Solution

4.1.5.1 Part a

Equilibrium position is where the slope of the potential energy is zero. This position x0 is found by solving for x fromdVdx=0 But dVdx=a2(2x3)b(x2)=ax3+bx2=a+bxx3

Hencea+bxx3=0bx=a

Therefore x0=ab

4.1.5.2 Part b

Approximating V(x) around x0 using Taylor series givesV(x)V(x0)+(xx0)V(x0)+(xx0)22!V(x0)+ But dVdx evaluated at x0 is zero, since this the equilibrium point. The above simplifies to(A)V(x)V(x0)+(xx0)22!V(x0)+ Higher terms are ignored, because (xx0) is assumed small and mass remain close to x0. ButV(x0)=a2x02bx0 And since x0=ab from part (a), the above simplifies toV(x0)=a2(ab)2b(ab)=ab22a2b2a=b22ab2a(A1)=12b2a

And d2Vdx2=ddx(ax3+bx2)=3ax4bx3

At x=x0 the above becomesV(x0)=3a(ab)4b(ab)3(A2)=b4a3

Using (A1,A2) into A givesV(x)12b2a+(xx0)22!b4a3+12b2a+(xab)22b4a3+12b2a+12(x2+a2b22xab)b4a3+12b2a+12ab2+12a3b4x21a2b3x+b42a3x2b3a2x+

Therefore near x0 the potential energy is approximated as(1)V(x)b42a3x2b3a2x The force on the mass is given by F=dVdx Using V(x) in (1) the force becomesF=b4a3xb3a2 But F=md2xdt2. Hence we obtain the equation of motion asmd2xdt2=F=b4a3xb3a2

Thereforemd2x(t)dt2+b4a3x(t)=b3a2(B)d2x(t)dt2+(b4ma3)x(t)=b3ma2

Let b4ma3=ω2 The equation of motion (B) becomesd2x(t)dt2+ω2x(t)=b3ma2 But this is standard second order ode whose solution is x(t)=Acos(ωt)+Bsin(ωt)+xp(t) Where xp(t) is the particular solution due to the forcing function b3ma2 and A,B are constants of integrations found from initial conditions. Since the forcing function is just constant, and not function function of time, the above becomesx(t)=Acos(ωt)+Bsin(ωt)+Fp=Acos(ωt+ϕ)+Fp

Therefore the motion is simple harmonic motion since cos(ωt+ϕ) is harmonic. The forcing function Fp has no effect on the nature of the harmonic motion, other than adding an extra constant displacement shift to x(t) for all time. Since there is no damping, the particle will continue this motion forever.

The following is a plot of the solution for 10 seconds using arbitrary values for a,b,m and with initial conditions x(0)=1,x(0)=0. The solution shows the motion is harmonic as expected.

pict
Figure 4.2:Plot of solution
4.1.5.3 Part c

The angular frequency of oscillation isω=b4ma3 In radians per second. The quantity b4a3 can be called the stiffness k (Newton per meter). Hence ω=km.

4.1.5.4 Appendix

An easier way to do part b, is to keep (xx0) intact and replace this with y at the end. Like this

Using (A1,A2) into A givesV(x)12b2a+(xx0)22!b4a3+ The force on the mass is given by F=dVdx=(xx0)b4a3

But F=md2xdt2. Hence we obtain the equation of motion asmd2xdt2=F=(xx0)b4a3

Now let y=xx0. the above becomesmd2ydt2=yb4a3md2ydt2+yb4a3=0d2ydt2+yb4ma3=0

Which is SHM. Using this method, it is faster to show.

4.1.6 key solution for HW 1

PDF