Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

x array: func1: derivative: Use the x arrray and the derivative array calculated in this problem to find the x locations of the three extrema

image text in transcribedx array: image text in transcribed

func1: image text in transcribed

derivative: image text in transcribed

Use the x arrray and the derivative array calculated in this problem to find the x locations of the three extrema in the function funci . One possibility is to find the array index pointing at the location where the sign of the derivative changes. Between the corresponding value pairs is the root. Interpolate linearly between these two points for an accurate determination of the x coordinate of the three extreme. Add the three values, round to two digits and enter into question deriv-roots. x = linspace(-2.5,1, 101) def func1(x): ''Functioni' f = sin(x**2)*((x**2)/(exp(-x/2))) return f def deriv(f,x,h): dfdx = (f(x+h) - f(x-h)) / (24h) return dfdx deriv1 = deriv(f,x,0.01) Use the x arrray and the derivative array calculated in this problem to find the x locations of the three extrema in the function funci . One possibility is to find the array index pointing at the location where the sign of the derivative changes. Between the corresponding value pairs is the root. Interpolate linearly between these two points for an accurate determination of the x coordinate of the three extreme. Add the three values, round to two digits and enter into question deriv-roots. x = linspace(-2.5,1, 101) def func1(x): ''Functioni' f = sin(x**2)*((x**2)/(exp(-x/2))) return f def deriv(f,x,h): dfdx = (f(x+h) - f(x-h)) / (24h) return dfdx deriv1 = deriv(f,x,0.01)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are some relevant factors in determining research objectives?

Answered: 1 week ago

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago