Homework 2.2

Andy Long, Spring, 2024

Section 2.2, pp. 57--, #1, 2a-f, 10, 12, 13

Some problems are solved in Octave:

https://octav.onl/youat248

#2

meanValueTheoremTesterFinder[f_,a_,b_]:=
Module[{fa=f[a],fb=f[b],m},
m=(fb-fa)/(b-a);
p1=Plot[{f[x],m*(x-a)+fa},{x,a,b}];
Print[N[Solve[f'[x]==m,x]]];
p1
]
f[x_]:=3-x-Sin[x]
meanValueTheoremTesterFinder[f,2,3]
f[x_]:=3x^4-2x^3-3x+2
meanValueTheoremTesterFinder[f,0,1]
f[x_]:=3x^4−2x^3−3x+2
meanValueTheoremTesterFinder[f,0,0.9]
f[x_]:=10-Cosh[x]
meanValueTheoremTesterFinder[f,-3,-2]
f[x_]:=Sqrt[4+5Sin[x]]-2.5
meanValueTheoremTesterFinder[f,-6,-5]
f[x_]:=(3x^2Tan[x])/(1-x^2)
meanValueTheoremTesterFinder[f,20,23]

#10

fixedPointFinder[f_,a_,b_]:=
Module[{fa=f[a],fb=f[b],m},
m=(fb-fa)/(b-a);
p1=Plot[{f[x],x},{x,a,b}];
Print[N[Solve[f'[x]==m,x]]];
p1
]
f[x_]:=(3x^2-1)/(6x+4)
fixedPointFinder[f,-4,-0.9]

results=fixedPoint[f,-1.5,maxits->1000,verbose->True,tolerance->10^-2]

#12

f[x_]:=CubeRoot[8-4x]
fixedPointFinder[f,1.2,1.5]
Plot[Abs[f'[x]],{x,1.2,1.5}]
results=fixedPoint[f,1.2,maxits->1000,verbose->True,tolerance->10^-2];
results=fixedPoint[f,1.5,maxits->1000,verbose->True,tolerance->10^-2];

#13

f[x_]:=2^(x/2)
fixedPointFinder[f,1,3]
Plot[Abs[f'[x]],{x,1,3}]
results=fixedPoint[f,1.0,maxits->1000,verbose->True,tolerance->10^-2];
results=fixedPoint[f,3.0,maxits->1000,verbose->True,tolerance->10^-2];