Question: Assignment 9 - Integration For this assignment, you will be computing magnetic fields using the following integral, B = - L 2 L 2 [
Assignment Integration
For this assignment, you will be computing magnetic fields using the following integral,
where a represents the distance away from a wire and represents the length of the wire, and Teslathe permeability of free space For all of your computations, let Amps, and For all of your computations, report the magnetic field in units of microteslas Be sure to pay attention to all of the units!
Use sympy to calculate this integral analytically and to determine the value of Measure the computation time for the sympy calculation.
Use the quad function to calculate this integral numerically to determine the value of Discuss the size of the numerical error for this computation. Measure the computation time for the quad calculation.
Create a function that works just like the quad function, but takes an extra input parameter N and computes the integral using a Riemann sum of rectangles. Use your function to compute the integral for different values of For each of the different values of report both the result of the integral and the computation time. Discuss these results. Specifically, discuss how the results of the three different methods sympy quad, and Riemann sum compare to each other in terms of both the accuracy of the computation and the computation time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
