Question: Can you help me this of task 3 and 4? These are about python questions thank you ask | Write a function approx_in(x, n) that

Can you help me this of task 3 and 4?
These are about python questions
thank you

ask | Write a function approx_in(x, n) that approximates the logarithm by n steps of the above algorithm. ask 2 Plot both functions.In and approx_ln, in one plot and the difference of both functions in another plot. Do this for different values of n. 1 W Task 3 Consider r = 1.41. Plot the absolut value of the error versus n. Task 4 In the above article a method is suggested to accelerate the convergence: . . doi = 0,9 i=0,...,n dki dx-1,4-4-4d4-1,-1, k= 1,...,n i = 0,...," As approximation to in the value 2. is taken. Write a function fast_approx_in (x, n) in which this approach is implemented. In this homework we will approximate the log-function by an iteration method. Every iteration improves the result. The iteration is described in B. C. Carlsson: An Algorithm for Computing Logarithms nd Arctangents, MathComp. 26 (118), 1972 pp. 543-549. It is based of computing the arithmetic and geometric mean of two values ai, Gi: For a given value x > 0, initialize ao = (1), go = VT, Iterate ai+1 = 49 and gi+1 = ai+19i, as an approximation to ln(2). Consider 1-1 a; Task 1 Write a function approx_ln (x, n) that approximates the logarithm by n steps of the above algorithm. Task 2 Plot both functions,In and approx_ln, in one plot and the difference of both functions in another plot. Do this for different values of n. I got a task from python class can you help me these task 1,2?? thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
