Question: MUST BE PRESENTABLE: in a given function g(x) = hcos(x^2)+jx+(-ke^x)+5.02 for g(x) =0 ,when h=2, j=3, k=4 define func with 5 parameters (h,j,k,x) in one

MUST BE PRESENTABLE:
in a given function g(x) = hcos(x^2)+jx+(-ke^x)+5.02
for g(x) =0 ,when h=2, j=3, k=4
define func with 5 parameters (h,j,k,x)
in one plt.plot line plot without assignation of arrays (do not define N prior to plot)
reverse N for grid sampling when searching for solutions
error @ eps=10^-3
start by identifying where g crosses zero in the whole interval (beg,end)
for each interval found, apply a finer N grid and where the solutions is now smaller
make a while loop to repeat the previous step and find smaller intervals where the solution is
while loop stops when solution is acceptable from all interation mentioned earlier and doesnt differ from the solution in the current interation by more than esp
before the last value, recall next interation
print commands in the loops to check and use N not as frequently to minimize the code duration
print out the answer
Thank you

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!