Question: using python ... math programing Answers to Problem 4 In [ ]: # You add in the missing code def fresnel_integrator (xvals): fvals - np.zeros
using python ... math programing![using python ... math programing Answers to Problem 4 In [ ]:](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66deaeaf76e62_74266deaeaeef317.jpg)

Answers to Problem 4 In [ ]: # You add in the missing code def fresnel_integrator (xvals): fvals - np.zeros (int (n)+1) for jj in xrange (0,: cx = np . cos (x2) sxnp.sin (x2) fupdate- fvals(jj+1) = return fvals xvals - np.linspace (0.,10.,int (le3)+1) fvals -fresnel_integrator (xvals) plt.plot (xvals,fvals) pit . xlabel(' $x$ , ) plt.xlabel( $f (x)$) In [ ]: # You add in the missing code fvalf-spqd.quad (lambda t: np.sin(t**2,0.,10.) nvas = evals = np. array() np zeros () for ll in xrange (0,): xvals np.linspace (0.,10.,) fvals -fresnel_integrator (xvals) evals[11] = np . log 10(np.abs (fvals[-1]-fvalt)) plt.plot (np.log10 (nvals), evals) plt.xlabel(ns) plt.ylabel( $\log_ 110) Error ) Answers to Problem 4 In [ ]: # You add in the missing code def fresnel_integrator (xvals): fvals - np.zeros (int (n)+1) for jj in xrange (0,: cx = np . cos (x2) sxnp.sin (x2) fupdate- fvals(jj+1) = return fvals xvals - np.linspace (0.,10.,int (le3)+1) fvals -fresnel_integrator (xvals) plt.plot (xvals,fvals) pit . xlabel(' $x$ , ) plt.xlabel( $f (x)$) In [ ]: # You add in the missing code fvalf-spqd.quad (lambda t: np.sin(t**2,0.,10.) nvas = evals = np. array() np zeros () for ll in xrange (0,): xvals np.linspace (0.,10.,) fvals -fresnel_integrator (xvals) evals[11] = np . log 10(np.abs (fvals[-1]-fvalt)) plt.plot (np.log10 (nvals), evals) plt.xlabel(ns) plt.ylabel( $\log_ 110) Error )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
