Question: I got a task from python class can you help me these task 1,2?? thank you In this homework we will approximate the log-function by

I got a task from python class
can you help me these task 1,2??
thank you
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 aigi: For a given value x > 0, initialize ao = (17+go = VT, uitgi and 9i+1 Vai+19i, . Consider 1-1 as an approximation to ln(x). Iterate di+1 ai Task 1 Write a function approx_in(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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
