I am given the function x(t)=4arctant and told that routine computations will show that x(0)=0 and x(1)=pi.. I must determine a differential equation for x(t) of the form x′(t)=f(t,x). I must then use f to approximate pi.

Marco Hudson

Marco Hudson

Answered question

2022-08-12

I am given the function x ( t ) = 4 arctan t and told that routine computations will show that x ( 0 ) = 0 and x ( 1 ) = π.
I must determine a differential equation for x ( t ) of the form x ( t ) = f ( t , x ).
I must then use f to approximate π.
I will use Euler's Method to find minimum number of iterations ( n) needed to yield the approximation π 3.1400, such that n 1 iterations is strictly less than 3.1400.
How do I find n? It seems to me that it can't be found given the instruction set that I am provided.

Answer & Explanation

Kasey Bird

Kasey Bird

Beginner2022-08-13Added 13 answers

I think you are expected to divide [0,1] into n intervals, use Euler's method to integrate 1 1 + t 2 over the interval and see what you get for x=1. For n=5, you would compute x ( 1 5 ) = x ( 0 ) + 1 5 x ( 0 ) = 0 + 1 5 1 = 0.2, x ( 2 5 ) = x ( 1 5 ) + 1 5 x ( 1 5 ) 0.2 + 1 5 0.961538 0.392308 ,, continue stepping until you get to x(1), and compare it with π 4 . The problem I have is that the derivative is decreasing over the interval, so the forward Euler's method overestimates the function, while the problem assumes it underestimates the function. At n=10 I get x ( 1 ) 0.809981, an error of about 0.025. Since the global truncation error goes as 1 n , we would expect to need 10 times more terms to get the error to be below 0.0025 so the error in π is less than 0.01 and that is what I find in Excel. You would need to look more closely to find the exact n requiblack.

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?