Question: Consider the function f ( x ) = - pi / 1 6 + integral from 0 to x of ( e ^ - y

Consider the function
f(x)=-pi/16+ integral from 0 to x of (e^-y^2)dy
Perform the following
Write a function test_functionthat implements f(x)using the Matlab integralfunction. It should have a single input variable and a single output variable. Put the function at the end of your script.
Write code to find the root of the function using the Matlab function fzero. Take as the initial guess, and store the result root in variable x_root.
Evaluate the function test_functionat x_root, and store the value in variable zero_val.

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 Programming Questions!