0

Consider the following problem $$y' = \ln\ln(4+y^2), \quad x\in[0,1], y(0)=1$$ We can formulate the problem the approximate the solution $$y_{n+1} = y_n + h \ln \ln(4+y_n^2), \qquad n = 0,1,...,N-1, \quad 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|\leq \frac{h}{2!}|(\ln\ln(4+\xi^2))'| \quad \xi \in (x_n,x_{n+1})$$

Now $$\ln\ln(4+y^2)' = \frac{d}{dy}\ln\ln(4+y^2) = \frac{2y\ln\ln(4+y^2)}{\ln(4+y^2)(4+y^2)} \leq \frac{2y}{4+y^2} \leq 1/2$$

$$\therefore |T_n| \leq \frac{h}{4}$$

Is this the correct way to go about obtaining this?

  • I believe you are missing a power of $h$. The truncation error for Euler's method should be $O(h^2)$ rather than $O(h)$. It is true, that the global error of Euler's method is $O(h)$, but that is something different. You have the right idea, but have another look at the application of the chain rule. Suggestion, compute the derivative of something simpler, but closely related, namely $f(x) = \ln \ln x$. – Carl Christian Aug 08 '17 at 21:41
  • In my book the truncation error is defined as $$T_n = \frac{y(x_{n+1})-y(x_n)}{h} - y'(x_n)$$ which on expanding in a taylor series gives $$T_n = \frac{1}{2}hy''(\xi_n)$$can these things be defined differently? –  Aug 10 '17 at 13:17
  • You should follow you textbook. I normally view the smooth function $y$ as a approximate solution of the iteration $v_{n+1} = v_n + h f(t_n,v_n)$. By Taylor's formula, we have $y_{n+1} = y_n + hf(t_n,y_n) + \frac{1}{2} y''(\xi_n) h^2$ for some $\xi_n$ between $t_n$ and $t_{n+1}$. It is the excess, i.e., the term $\frac{1}{2} y''(\xi_n) h^2$ which is often called the local truncation error. Personally, I prefer this definition, because it allows for a "pretty" analysis of the global error, but this is a very subjective point. In truth, I had forgotten that the other possibility. – Carl Christian Aug 10 '17 at 16:52

1 Answers1

0

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{align} f(y) &= 4 + y^2 \\ g(y) &= \ln(y) \\ h(y) &= g(y). \end{align} Then $$k(y) = h(g(f(y)) = \ln(\ln(4+y^2)$$ is the function of interest and $k$ is defined and differentiable for all $y$. Moreover, $$ k'(y) = h'(g(f(y))g'(f(y))f'(y) = \frac{1}{\ln(4+y^2)}\frac{1}{4+y^2}2y.$$ The derivative $k'$ can be bounded as follows $$ |k'(y)| \leq \frac{1}{\ln(4)} \frac{2|y|}{4 + y^2},$$ because $\ln$ is monotone increasing. You have already applied the helpful inequality $$ |ab| \leq \frac{1}{2} (a^2 + b^2),$$ which in our case, where $a=2$ and $b=|y|$, allows for the estimate $$ |k'(y)| \leq \frac{1}{2 \ln(4)}.$$

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.

Carl Christian
  • 12,583
  • 1
  • 14
  • 37
  • Thank you for the answer. This is perfectly sufficient.This is part of a larger question, the final part is proving very difficult which I have also posted on here https://math.stackexchange.com/questions/2389153/finding-the-upper-bound-on-an-expression –  Aug 10 '17 at 17:25