15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Numerical Integration (Quadrature)<br />

Numerical Integration (Quadrature)<br />

The area beneath a section <strong>of</strong> a function F(x) can be determined by numerically<br />

integrating F(x), a process referred to as quadrature. The <strong>MATLAB</strong> quadrature<br />

functions are:<br />

quad<br />

quadl<br />

quadv<br />

dblquad<br />

triplequad<br />

Use adaptive Simpson quadrature<br />

Use adaptive Lobatto quadrature<br />

Vectorized quadrature<br />

Numerically evaluate double integral<br />

Numerically evaluate triple integral<br />

To integrate the function defined by humps.m from 0 to 1, use<br />

q = quad(@humps,0,1)<br />

q =<br />

29.8583<br />

Both quad and quadl operate recursively. If either method detects a possible<br />

singularity, it prints a warning.<br />

You can include a fourth argument for quad or quadl that specifies a relative<br />

error tolerance for the integration. If a nonzero fifth argument is passed to quad<br />

or quadl, the function evaluations are traced.<br />

Two examples illustrate use <strong>of</strong> these functions:<br />

• Computing the length <strong>of</strong> a curve<br />

• Double integration<br />

Example: Computing the Length <strong>of</strong> a Curve<br />

You can use quad or quadl to compute the length <strong>of</strong> a curve. Consider the curve<br />

parameterized by the equations<br />

xt () = sin( 2t)<br />

, yt () = cos( t)<br />

, zt () = t<br />

where t ∈ [ 0,<br />

3π]<br />

.<br />

4-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!