quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryرياضيات schoolبكالوريوس event_available2026-07-15

السؤال

Transcribed Image Text:

P1) In this problem we are going to solve numerically the following differential equation x'(t) = f(x(t)), 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 1 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=Xn+h(1 − xn+1 )tanh(xn+1), for 10 different initial conditions x (0) in the interval (0,1), time step h= 0.05 and T 10

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top