Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions