You are on page 1of 1

Numerical Methods Laboratory 05.05.

2017
Matlab functions: trapz, quad, quadv, dblquad, ode45

1. Determine the distance traveled for the following data (trapz):

t 1 2 3.25 4.5 6 7 8 9 9.5 10


v 5 6 5.5 7 8.5 8 6 7 7 5

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

You might also like