Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use python 3. Make sure to pass the test case. Please post the image of your code will appropriate spacing. For this problem you'll be

image text in transcribedimage text in transcribedUse python 3. Make sure to pass the test case. Please post the image of your code will appropriate spacing.

For this problem you'll be evaluating some integrals numerically, using the np.trapz function. Choosing the number of points for your discrete grid is up to you-but your answers should be accurate to within 0.1% of the exact result. Check that your answer is accurate, and use more points in your grid if it's not, or you will lose points!! (Hint: how can you check your answer? Remember, a simple test is just to increase the number of points on your grid, and see if the answer changes or not This generally works even for cases where you don't know the right answer.) (Another hint: the first integral is easy to work out by hand, so you know the right answer...the second integral also has an analytic answer, although it's harder to get.) Evaluate the integral 2R 0 Save your numerical answer to the variable integral_J. The visible testing cell will do a simple check that your integral is positive, it's up to you to verify the answer. integral_I0 integralJ = 0. integral-K 0. - ## YOUR CODE HERE # Basic sanity check - not a thorough test! print(integral_]) assert integral_J0 # Hidden testing cell - do not delete

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

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

Students also viewed these Databases questions