Here's my code:
k = 1;
L = 1;
λ[n_] = (((2*n - 1)*Pi)/(2*L))^2;
v[x_] = -50*x + 100;
f[x_] = (300*x*Cos[11*x] + 100)*(1 - x);
b[n_] = (2/L)*Integrate[(f[x] - v[x])*Sin[Sqrt[λ[n]]*x], {x, 0, L}];
w[x_, t_] = Sum[b[i]*Sin[Sqrt[λ[i]]*x]*Exp[(-λ[i])*k*t], {i, 1, 5}];
u[x_, t_] = v[x] + w[x, t];
Manipulate[Plot[{u[x, t], f[x], v[x]}, {x, 0, L},
PlotStyle -> {{Thick, Black}, {Thick, Blue}, {Thick, Red}},
AxesLabel -> {x, u}, PlotRange -> {-30, 120},
PlotLegends -> "Expressions"], {t, 0, .5}]
Note how the right edge of the box of the output jumps back and forth depending on how many decimal places is shown for a specific $t$ value. How can I anchor that right edge so it doesn't move back and forth?
InputForm
instead $\endgroup$\*SubsuperscriptBox[...
is very hard to read if I don't have mma with me to copy-paste into the FE. You could doInputForm[Hold[stuff goes here]]
and copy-paste everything inside theHold[output here]
$\endgroup$