PRob. 12.3.19: Clamped/Clamped Beam

Here are a few of the details discussed in class realting to finding eigenfunctions:

Find the roots of the characteristic equation Cos[b] Cosh[b]=1. (I will use b to represent βL.) Start off graphically.

Plot[{Cos[b], 1/Cosh[b]},{b,0,15}, PlotRange -> {-1,1},PlotStyle ->AbsoluteThickness[3]]

Plot[Cos[b]-1/Cosh[b],{b,0,15}, PlotRange -> {-1,1},PlotStyle ->AbsoluteThickness[3]]

Find more accurate values numerically:

FindRoot[Cos[b]-1/Cosh[b], {b,4.5,5.0}]

FindRoot[Cos[b]-1/Cosh[b], {b,7.5,8.0}]

FindRoot[Cos[b]-1/Cosh[b], {b,10.5,11.5}]

roots = {4.73,7.8532, 11.00}

Create the eigenfunctions by plugging these values into the solution of the x-equation:

f[x_,b_] := Cos[b*x]-Cosh[b*x]+(Cos[b]-Cosh[b])/(Sinh[b]-Sin[b])*(Sin[b*x]-Sinh[b*x])

shape = f[x,#]& /@ roots

Test orthogonality.

Table[Integrate[shape[[i]]*shape[[j]], {x,0,1}],{i,1,3},{j,1,3}] // Chop

NumberForm[%,{3,3}]

Not quite perfectly orthgonal. Compute roots more precisely is this is problem. 
Plot the approximate eigenfunctions.

Plot[shape,{x,0,1},PlotStyle ->AbsoluteThickness[3]]

Compute the coeeficients in the expansion for (((x^2)(1-x))^2) in terms of the eigenfunctions:

Table[Integrate[shape[[i]]*x^2*(1-x)^2, {x,0,1}],{i,1,3}]

Chop to get rid of small quantities (like irrelevant complex components):

coeffs = Chop[%]

Create the solution as a linear combination of the eigenfunctions:

soln = coeffs.shape

Plot the solution:

Plot[soln,{x,0,1}, PlotStyle->AbsoluteThickness[3]]

Plot the error. (Note that it is dominated by the next eigenfunction.)

Plot[soln-x^2*(1-x)^2,{x,0,1}, PlotStyle->AbsoluteThickness[3]]