Question: P1) In this problem we are going to solve numerically the following differential equation x'(t)-f(x(0), By an implicit Euler scheme. To do this, remember that

 P1) In this problem we are going to solve numerically the

following differential equation x'(t)-f(x(0), By an implicit Euler scheme. To do this,

P1) In this problem we are going to solve numerically the following differential equation x'(t)-f(x(0), By an implicit Euler scheme. To do this, remember that if the time step is h the requested scheme takes the form xn+1 = xn + hf(xn+1). we know that for a general f this equation cannot be implemented in a computer. For what follows the exercise consider f(x)= (1-x)tanh(x), and that x(0) E (0,1). a) To find a solution to the equation g(x*) = 0, we are told that it is possible through a program in the following way I start the values L, U and tolerance so that L is less than U. 2 as long as the difference between U and L is greater than the tolerance 3 initialize m as the midpoint of the interval [L, U] 4 if g(m) has the same sign as g(L) then 5 assign the value of m to L 6 if not 7 assign the value of m to U Implement some algorithm in the PYTHON programming language. Justify that the algorithm is a value to solve the problem g(x) = 0 or modify it if you do not agree b) Assuming xn known, use the result from the previous part to find an x* solution of x* = xn + hf(x*), that is, identify who the function g should be. c) Solve, using the previous parts, the differential equation x'(t) = (1 - x(t)) tanh(x(t)), using the numerical scheme Xn+1=2n +h(1 - Xn+1 )tanh(2n+1), for 10 different initial conditions x (0) in the interval (0,1), time step h = 0.05 and T = 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!