Section 6: Applications of Integrals

3.1: Finding Areas

Plot[{x^3,1/x^2},{x,2,4},PlotRange->{-5,70},Filling->{1->{2}}]

Plot[{x,x^2},{x,-2,2}]

Plot[{x,x^2,If[0<x<1,x]},{x,-.5,1.5},Filling->{3->{2}}]

ContourPlot[{y==x^2,y==2-x,y==0},{x,-3,3},{y,-1,5}]

Show[
ContourPlot[{y==x^2,y==2-x,y==0},{x,-1,3},{y,-1,3}],
RegionPlot[0<=y&&0<=x&&y<=x^2&&y<=2-x,{x,-1,3},{y,-1,3},PerformanceGoal->"Quality",MaxRecursion->10]
]

Show[
ContourPlot[{y==x^2,y==2-x,y==0},{x,-1,3},{y,-1,3}],
RegionPlot[{0<=y&&0<=x<=1&&y<=x^2,0<=y<=2-x&&1<=x<=2},{x,-1,3},{y,-1,3},PerformanceGoal->"Quality",MaxRecursion->10]
]

ContourPlot[{y^2==x+3,y==x-3},{x,-4,8},{y,-6,6}]

Show[
ContourPlot[{y^2==x+3,y==x-3},{x,-4,8},{y,-6,6}],
RegionPlot[y^2-3<=x<=y+3,{x,-4,8},{y,-6,6}]
]

ContourPlot[{y==x^2+1,y==17-x^2,x==1},{x,0,3},{y,0,18}]

Show[
ContourPlot[{y==x^2+1,y==17-x^2,x==1},{x,0,3},{y,0,18}],
RegionPlot[{x>=1 && x^2+1<=y<=9, x>=1 &&9<=y<=17-x^2},{x,0,3},{y,0,18}]
]

Show[
ContourPlot[{y==x^2+1,y==17-x^2,x==1},{x,0,3},{y,0,18}],
RegionPlot[{x>=1 && x^2+1<=y<=17-x^2},{x,0,3},{y,0,18}]
]

3.2: Physical and Economic Applications

Consumer and Producer Surplus

d[q_]:=20-.05q
s[q_]:=2+.0002q^2
Plot[{d[q],s[q]},{q,0,400}]
Plot[{d[q],s[q],10},{q,0,200}]
Plot[{d[q],s[q],10},{q,0,200},Filling->{1->{3}}]
Plot[{d[q],s[q],10},{q,0,200},Filling->{2->{3}}]

Averages

Plot[{x,x^2},{x,0,1}]
Plot[{x,x^2},{x,0,3}]

Distance and Speed

v[t_]:=t^2-6t
Plot[v[t],{t,0,10},AxesLabel->{"time in seconds","speed in meters per second"}]

Plot[{v[t],If[t<=6,v[t]],If[t>=6,v[t]]},{t,0,10},AxesLabel->{"time in seconds","speed in meters per second"},Filling->{2->Axis,3->Axis}]

Work

6.3: Volumes by Rotation

RegionPlot3D[x^2+y^2≤1&&0≤z≤Sqrt[3](1-x^2-Abs[y])/2,{x,-1,1},{y,-1,1},{z,0,1},AxesLabel->{x,y,z}]

f[x_]:=x^2
g[x_]:=0
RegionPlot[g[x]≤y≤f[x],{x,0,5},{y,0,25},AspectRatio->5]
RegionPlot3D[g[x]^2≤y^2+z^2≤f[x]^2,{x,0,5},{y,-25,25},{z,-25,25}]

f[y_]:=Sqrt[y]
g[y_]:=0
RegionPlot[g[y]≤x≤f[y],{x,0,5},{y,0,25},AspectRatio->5]
RegionPlot3D[g[y]^2≤x^2+z^2≤f[y]^2,{x,-5,5},{y,0,25},{z,-5,5}]

f[x_]:=x
g[x_]:=x^2
RegionPlot[g[x]≤y≤f[x],{x,0,1},{y,0,1}]
RegionPlot3D[g[x]^2≤y^2+z^2≤f[x]^2,{x,0,1},{y,-1,1},{z,-1,1},
PlotPoints->100,WorkingPrecision->60,
Method->{"TransparentPolygonMesh"->True}]

f[x_]:=x
g[x_]:=x^2
RegionPlot[g[x]≤y≤f[x],{x,0,1},{y,0,2},
PlotPoints->50,WorkingPrecision->32,
Method->{"TransparentPolygonMesh"->True}]
RegionPlot3D[(2-g[x])^2>=(y-2)^2+z^2>=(2-f[x])^2,{x,0,1},{y,0,4},{z,-2,2},
PlotPoints->50,WorkingPrecision->32,
Method->{"TransparentPolygonMesh"->True}]

f[x_]:=x
g[x_]:=Sqrt[x]
RegionPlot[g[x]≤y≤f[x],{x,0,1},{y,0,2},
PlotPoints->50,WorkingPrecision->32,
Method->{"TransparentPolygonMesh"->True}]
RegionPlot3D[(2-g[x])^2>=(x-2)^2+z^2>=(2-f[x])^2,{x,0,1},{y,0,4},{z,-2,2},
PlotPoints->50,WorkingPrecision->32,
Method->{"TransparentPolygonMesh"->True}]