Question: SOLVE IN PYTHON!! f ( x ) = x ^ cos ( x ^ 2 ) , solve the integral ( from 0 to 4

SOLVE IN PYTHON!!
f(x)= x^cos(x^2), solve the integral (from 0 to 4) f(x) dx.
Setup: Let n =50 be the number of subintervals in our domain partition. Use np.arange() to
define a Python list called Partition that contains n ordered pairs, which represent the endpoints
of intervals in [0,4] with length 4/n. For example, you should see the following output if you printed
Partition with n =5:
[(0.0,0.8),(0.8,1.6),(1.6,2.4),(2.4,3.2),(3.2,4.0)]
Be aware that small roundoff errors may appear when defining the ordered pairs; if this happens,
it is normal and will not cause any problems.
1. Use sp.plot() to plot f(x) in a window with x-range [0,4] and y-range [0,4].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!