Aubrie Mccall

2022-09-06

Consider the following problem
${y}^{\prime }=\mathrm{ln}\mathrm{ln}\left(4+{y}^{2}\right),\phantom{\rule{1em}{0ex}}x\in \left[0,1\right],y\left(0\right)=1$
We can formulate the problem the approximate the solution
${y}_{n+1}={y}_{n}+h\mathrm{ln}\mathrm{ln}\left(4+{y}_{n}^{2}\right),\phantom{\rule{2em}{0ex}}n=0,1,...,N-1,\phantom{\rule{1em}{0ex}}{y}_{0}=0$
with mesh points ${x}_{n}=nh$. I am tasked with finding the truncation error. Now considering a Taylor series we find that
$|{T}_{n}|\le \frac{h}{2!}|\left(\mathrm{ln}\mathrm{ln}\left(4+{\xi }^{2}\right){\right)}^{\prime }|\phantom{\rule{1em}{0ex}}\xi \in \left({x}_{n},{x}_{n+1}\right)$
Now
$\mathrm{ln}\mathrm{ln}\left(4+{y}^{2}{\right)}^{\prime }=\frac{d}{dy}\mathrm{ln}\mathrm{ln}\left(4+{y}^{2}\right)=\frac{2y\mathrm{ln}\mathrm{ln}\left(4+{y}^{2}\right)}{\mathrm{ln}\left(4+{y}^{2}\right)\left(4+{y}^{2}\right)}\le \frac{2y}{4+{y}^{2}}\le 1/2$
$\therefore |{T}_{n}|\le \frac{h}{4}$
Is this the correct way to go about obtaining this?

bequejatz8d

I believe that the only mistake is in your application of the chain rule. I find it helpful to break the function into its composite parts and apply the chain rule one step at a time.

Let $f,g,h$ be the functions given by
$\begin{array}{rl}f\left(y\right)& =4+{y}^{2}\\ g\left(y\right)& =\mathrm{ln}\left(y\right)\\ h\left(y\right)& =g\left(y\right).\end{array}$
Then
$k\left(y\right)=h\left(g\left(f\left(y\right)\right)=\mathrm{ln}\left(\mathrm{ln}\left(4+{y}^{2}\right)$
is the function of interest and $k$ is defined and differentiable for all $y$. Moreover,
${k}^{\prime }\left(y\right)={h}^{\prime }\left(g\left(f\left(y\right)\right){g}^{\prime }\left(f\left(y\right)\right){f}^{\prime }\left(y\right)=\frac{1}{\mathrm{ln}\left(4+{y}^{2}\right)}\frac{1}{4+{y}^{2}}2y.$
The derivative ${k}^{\prime }$ can be bounded as follows
$|{k}^{\prime }\left(y\right)|\le \frac{1}{\mathrm{ln}\left(4\right)}\frac{2|y|}{4+{y}^{2}},$
because ln is monotone increasing. You have already applied the helpful inequality
$|ab|\le \frac{1}{2}\left({a}^{2}+{b}^{2}\right),$
which in our case, where $a=2$ and $b=|y|$, allows for the estimate
$|{k}^{\prime }\left(y\right)|\le \frac{1}{2\mathrm{ln}\left(4\right)}.$
Breaking complicated functions into composite parts is especially useful when programming computers. One line per component produces a program which is easy for a human being to debug/verify.

Do you have a similar question?