Question: Consider the integral ) = E (x)= e-t dt a) Write a python program to calculate E(x) for values of x from 0 to
Consider the integral ) = E (x)= e-t dt a) Write a python program to calculate E(x) for values of x from 0 to 3 in steps of 0.1. Choose for yourself what method you will use for performing the integral and a suitable number of slices. b) When you are convinced your program is working, extend it further to make a graph of E(x) as a function of x.
Step by Step Solution
There are 3 Steps involved in it
import numpy as np import matplotlibpyplot as plt def y x Declaring the function fx 11xx return npex... View full answer
Get step-by-step solutions from verified subject matter experts
