Consider the following problem y′=lnln(4+y^2),x in [0,1],y(0)=1

Aubrie Mccall

Aubrie Mccall

Answered question

2022-09-06

Consider the following problem
y = ln ln ( 4 + y 2 ) , x [ 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 ) , n = 0 , 1 , . . . , N 1 , y 0 = 0
with mesh points x n = n h. I am tasked with finding the truncation error. Now considering a Taylor series we find that
| T n | h 2 ! | ( ln ln ( 4 + ξ 2 ) ) | ξ ( x n , x n + 1 )
Now
ln ln ( 4 + y 2 ) = d d y ln ln ( 4 + y 2 ) = 2 y ln ln ( 4 + y 2 ) ln ( 4 + y 2 ) ( 4 + y 2 ) 2 y 4 + y 2 1 / 2
| T n | h 4
Is this the correct way to go about obtaining this?

Answer & Explanation

bequejatz8d

bequejatz8d

Beginner2022-09-07Added 6 answers

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
f ( y ) = 4 + y 2 g ( y ) = ln ( y ) h ( y ) = g ( y ) .
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 ) = 1 ln ( 4 + y 2 ) 1 4 + y 2 2 y .
The derivative k can be bounded as follows
| k ( y ) | 1 ln ( 4 ) 2 | y | 4 + y 2 ,
because ln is monotone increasing. You have already applied the helpful inequality
| a b | 1 2 ( a 2 + b 2 ) ,
which in our case, where a = 2 and b = | y | , allows for the estimate
| k ( y ) | 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.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?