Professional Documents
Culture Documents
Numerical Methods Laboratory 050517
Numerical Methods Laboratory 050517
2017
Matlab functions: trapz, quad, quadv, dblquad, ode45
2 𝑒 𝑥 𝑠𝑖𝑛𝑥
2. Compute the integral ∫0 1+𝑥 2 𝑑𝑥 using Matlab functions for:
a. The trapezoidal method (trapz)
b. Simpson’s rule (quad)
c. Gauss quadrature rule (quadv)
1,2 2 −𝑦 2 /4
3. Use Matlab to solve the integral: ∬−1,−2 𝑥𝑒 −𝑥 𝑑𝑥𝑑𝑦 (dblquad)
4. Use Matalb to compute and plot the solution of the following equation (ode45):
𝑑𝑦
10 + 𝑦 = 20 + 7 sin 2𝑥
𝑑𝑥
𝑦(0) = 15