Shared15.1-4 - Integrals of Multivariable Functions.sagewsOpen in CoCalc
var('x,y')
f = 45 - x^2 - y^2
plot3d(f, (x,-6,6), (y,-3,3), aspect_ratio=[1,1,0.25])
3D rendering not yet implemented
I1 = integral(f, x, -6, 6)
I1
-12*y^2 + 396
integral(I1, y, -3, 3)
2160
integral( integral(f, x, -6, 6), y, -3, 3)
2160
integral(integral(f, y, -3, 3), x, -6, 6)
2160
f = 9 - x + 2*y
I1 = integral(f, y, 0, 1/2*x)
Ans1 = integral(I1, x, 0, 1)
Ans1
13/6
I1 = integral(f, y, x-1, 1/2*x)
Ans2 = integral(I1, x, 1, 2)
Ans2
13/6
integral( integral(f, x, 2*y, y+1), y, 0, 1)
13/3
integral(integral(3*x - 2*y, y, x^3, 8), x, 0, 2)
-2832/35
var('x,y')
(x, y)
I1 = integral(3*x - 2*y, x, 0, y^(1/3))
I1
-2*y^(4/3) + 3/2*y^(2/3)
integral( I1, y, 0, 8)
-2832/35
integral(integral(3*x - 2*y, x, 0, y^(1/3)), y, 0, 8)
-2832/35
var('x,y')
(x, y)
f = 3*y
plot3d(f, (x,0,1), (y,-1,1))
3D rendering not yet implemented

## Polar plot of cardioid and circle
C = polar_plot( 1 + cos(x), (x, 0, 2*pi), color='black')
S = polar_plot( 1, (x, 0, 2*pi))
C+S
C2 = polar_plot( 1 + cos(x), (x, -pi/2, pi/2), color='black')
S2 = polar_plot( 1, (x, -pi/2, pi/2))
C2+S2
var('r')
integral(integral(r, r, 1, 1+cos(x)), x, -pi/2, pi/2)
## Polar plot of lemniscate
P1 = polar_plot( 2*sqrt(cos(2*x)), (x, -pi/4, pi/4))
P2 = polar_plot( -2*sqrt(cos(2*x)), (x, -pi/4, pi/4))
P1+P2