Question
import math def arctan_series(x,tol=10**(-6),max_steps=100): n=0 j=0 k=(((-1)**n)*(x**(2**n+1)))/(2*n+1) while n tol: n+=1 j+=k return j if n==max_steps: return j+k arctan_series(0.7,tol=10**(-6),max_steps=100) This is my code for 1st
import math def arctan_series(x,tol=10**(-6),max_steps=100): n=0 j=0 k=(((-1)**n)*(x**(2**n+1)))/(2*n+1) while n
This is my code for 1st question , want to know where is wrong and no reaction about "arctan_series(0.7,tol=10**(-6),max_steps=100)" to output the final value.
def grid_search(f,a,b,n): n=0 y=list(range(f(a),f(b))) for i in range(f(a),f(b)+1): if y[i]>0 and y[i+1]0: n+=1 return n def f(x): return x**4+2*x**3-7*x**2-8*x+12 grid_search(f,1,10,100) This is for second question and where is the correct list range
Python! Python! Python! 1. Using the power series approximation 75 73 arctan(x) = x - 3 (-1)^r2n+1 + +...+ +..., 1x1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started