8-5 ������������

MATLAB ӤkiΩpܨƪwnG

ҦpAڭ̥ip humps b [0, 1] wnG

Example 1: 08-@ƾǨƪBzPR/quad01.marea = quad(@humps, 0, 1) area = 29.8583

quad quad8 ΤFj{ǡApG仼jIsƹF 10 Aؤk|Ǧ^ InfAYܩҭp⤧wniणsbAHpCquad quad8 ĥ|Ӥ޼ƥiΨӫwn۹~teԫסC

quad quadl ]iΨӭp⦱uסC]@uOѤUCѼƤƪ{ӪܡG

$$ \left\{ \begin{array}{l} x(t)=sin(2t)\\ y(t)=cos(t)\\ z(t)=t \end{array} \right. $$

䤤 t d [0, 3$\pi$]CuϧΦpUG

Example 2: 08-@ƾǨƪBzPR/plotCurve.mt = 0:0.1:3*pi; plot3(sin(2*t), cos(t), t);

Ѱ򥻷LniAu׵

$$ \int_0^{3\pi} \sqrt{ \left(\frac{dx(t)}{dt}\right)^2 + \left(\frac{dy(t)}{dt}\right)^2 + \left(\frac{dz(t)}{dt}\right)^2} dt = \int_0^{3\pi} \sqrt{\left[ 4cos^2(2t)+sin^2(2t)+1 \right]} dt $$

ڭ̥iwq curveLength.m pUG

function out = curveLength(t) out = sqrt(4*cos(2*t).^2+sin(t).^2+1);

huץippUG

Example 3: 08-@ƾǨƪBzPR/quad02.mlen = quad(@curveLength, 0, 3*pi) len = 17.2220

MATLAB dblquad OiΨӭpnC]ڭ̭np

$$ \int_{x_{min}}^{x_{max}} \int_{y_{min}}^{y_{max}} f(x, y) dx dy $$

䤤 $ f(x, y) = y sin(x) + x sin(y)$CĤ@ӨBJANOnإߤ@ӳQn integrand.mA䤺epUG

function out = integrand(x, y) out = y*sin(x) + x*cos(y);

`NOAWzƪJ޼ xBy Mnǡ]dxdy^@PCwqFQnƤAڭ̧YipnpUG

result = dblquad( 'integrand', xMin, xMax, yMin, yMax);

HUHƭȥNJdҡG

Example 4: 08-@ƾǨƪBzPR/dblquad01.mxMin = pi; xMax = 2*pi; yMin = 0; yMax = pi; result = dblquad(@integrand, xMin, xMax, yMin, yMax) result = -9.8696

b@몺pUAdblquad |Is quad HpwnCYIs quadlAЪw dblquad ̫@ӿJѼƧYiAҦpG

Example 5: 08-@ƾǨƪBzPR/dblquad02.mxMin = pi; xMax = 2*pi; yMin = 0; yMax = pi; result = dblquad(@integrand, xMin, xMax, yMin, yMax, 'quadl') result = -9.8696

hWAϥΪ̩wqnkiQ dblquad IsAunkJοX޼ƩM quad quadl @PYiC

Hint
  • `NG`L{DѡAаѨѳ̫@u`L{vC


MATLAB{]pGig