Numerical Approximation Schemes
Last edited: August 8, 2025Consider a general non-linear First Order ODEs:
\begin{equation} x’ = F(x) \end{equation}
Suppose we have some time interval, we have some solutions to the expression given. Is it possible for us to, given \(x(t_0) = x_0\), what \(x(t_0+T)\) would be? Can we approximate for explicit numbers?
The solutions have to exist for all time: blow-up cannot be present during numerical estimations.
Explicit Euler Method
\begin{equation} x(t+h) \approx x_{t+1} = x_{t} + h f(x_t) \end{equation}
Numerical Cantilever Simulations
Last edited: August 8, 2025Here’s the characteristic equation again:
\begin{equation} \pdv[2] x \qty(EI \pdv[2]{w}{x}) = -\mu \pdv{w}{t}+q(x) \end{equation}
After Fourier decomposition, we have that:
\begin{equation} EI \dv[4]{\hat{w}}{x} - \mu f^{2}\hat{w} = 0 \end{equation}
Let’s solve this!
E,I,u,f = var("E I u f")
x, L = var("x L")
w = function('w')(x)
_c0, _c1, _c2, _c3 = var("_C0 _C1 _C2 _C3")
fourier_cantileaver = (E*I*diff(w, x, 2) - u*f^2*w == 0)
fourier_cantileaver
-f^2*u*w(x) + E*I*diff(w(x), x, x) == 0
And now, we can go about solving this result.
solution = desolve(fourier_cantileaver, w, ivar=x, algorithm="fricas").expand()
w = solution
\begin{equation} _{C_{1}} e^{\left(\sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{0}} e^{\left(i \, \sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{2}} e^{\left(-i \, \sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{3}} e^{\left(-\sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} \end{equation}
Numerical Cantilever Simulations
Last edited: August 8, 2025Here’s the characteristic equation again:
\begin{equation} \pdv[2] x \qty(EI \pdv[2]{w}{x}) = -\mu \pdv{w}{t}+q(x) \end{equation}
After Fourier decomposition, we have that:
\begin{equation} EI \dv[4]{\hat{w}}{x} - \mu f^{2}\hat{w} = 0 \end{equation}
Let’s solve this!
E,I,u,f = var("E I u f")
x, L = var("x L")
w = function('w')(x)
_c0, _c1, _c2, _c3 = var("_C0 _C1 _C2 _C3")
fourier_cantileaver = (E*I*diff(w, x, 2) - u*f^2*w == 0)
fourier_cantileaver
-f^2*u*w(x) + E*I*diff(w(x), x, x) == 0
And now, we can go about solving this result.
solution = desolve(fourier_cantileaver, w, ivar=x, algorithm="fricas").expand()
w = solution
\begin{equation} _{C_{1}} e^{\left(\sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{0}} e^{\left(i \, \sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{2}} e^{\left(-i \, \sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} + _{C_{3}} e^{\left(-\sqrt{f} x \left(\frac{u}{E I}\right)^{\frac{1}{4}}\right)} \end{equation}
Numerical Stability
Last edited: August 8, 2025“being careful”
numerically stable vector norms
consider:
\begin{equation} \Vert x \Vert_{2} = \sqrt{x_1^{2} + \dots + x_{m}^{2}} \end{equation}
squaring it could easily go over MAX-float for large \(m\). Instead, consider:
\begin{equation} \Vert x \Vert_{2} = z \sqrt{\qty(\frac{x_1}{z})^{2} + \dots \qty(\frac{x_{m}}{z})^{2}} \end{equation}
where \(z = \max_{i} |x_{i}|\). Notice how now we are squaring numbers which are less than one, meaning this will never blow up. Yet, the results will be the same. This is bounded, therefore, by \(m\).
