SetDirectory[NotebookDirectory[]]

<<MaTeX`

pic = Show[{
ParametricPlot3D[{r*Cos[t],r*Sin[t],1-r^2},{r,0,1},{t,0,2Pi},
Mesh->Automatic, PlotPoints->{16, 32}, MaxRecursion->8,
BoundaryStyle->Black],
ParametricPlot3D[{Cos[t],Sin[t],0},{t,0,2Pi},
Mesh->Automatic, PlotPoints->{16, 32}, MaxRecursion->8,
PlotStyle->{Thick,Black}]
}, Ticks -> Table[Table[{x,MaTeX[x]},{x,-1,1}],{3}],
PlotRange-> {{-1.1,1.1},{-1.1,1.1},{0,1.1}}, ImageSize->600]

Export["illustration.png",%, ImageSize-> 600, ImageResolution->1200]

Join[Table[Table[{x,MaTeX[x]},{x,-1,1}],{2}],{{},{}}]

Show[pic,ViewPoint->{0,0,15}]

Export["above.png",%]

Darker[Green]//InputForm

"Preamble" -> {"\\usepackage{xcolor}","\\definecolor{refl}{rgb}{0.4,0.6,0.8}"}

preamble = {"\\usepackage{xcolor}",
"\\definecolor{darkred}{rgb}{0.666,0,0}","\\definecolor{darkgreen}{rgb}{0,0.666,0}"};
Graphics[{
{LightGray,Disk[{0,0},1]},
{Arrowheads[Medium],Table[Arrow[{{x,-Sqrt[1-x^2]},{x,Sqrt[1-x^2]}}],{x,-0.9,0.9,0.1}]},
{Darker@Green,Thick,Circle[{0,0},1,{-Pi,0}]},
{Darker@Red,Thick,Circle[{0,0},1,{0,Pi}]},
{Text[MaTeX["\\color{darkred}{+\\sqrt{1-x^2}}", FontSize->16, "Preamble" -> preamble], {0.85,0.8}],
Text[MaTeX["\\color{darkgreen}{-\\sqrt{1-x^2}}", FontSize->16, "Preamble" -> preamble], {0.85,-0.8}]}
}, Axes->True, PlotRange->1.2,ImageSize->600,
Ticks-> Table[Table[{x,MaTeX[x, FontSize->16]},{x,-1,1}],{2}]]

Export["hard_approach.png",%]

r = 2;
t= Pi/6;
Graphics[{
Circle[{0,0},r/5,{0,t}],
Arrowheads[Small],Thick,Arrow[{{0,0},{r Cos[t],r Sin[t]}}],
PointSize[Large],Point[{r Cos[t],r Sin[t]}],
Text[MaTeX["r",FontSize->18],{1,0.7}],
Text[MaTeX["\\theta",FontSize->16],{0.47,0.12}],
Text[MaTeX["(r,\\theta)",FontSize->16],{1.9,1}]
}, Axes -> True, PlotRange->{{-2.2,2.2},{-1.2,1.2}},
Ticks -> False, ImageSize->600]

Export["r_theta.png",%]

r = 2;
t= Pi/6;
Graphics[{
Circle[{0,0},r/5,{0,t}],
{Arrowheads[Small],Thick,Arrow[{{0,0},{r Cos[t],r Sin[t]}}]},
PointSize[Large],Point[{r Cos[t],r Sin[t]}],
Line[{{0,0},r{Cos[t],0},r{Cos[t],Sin[t]}}],
Text[MaTeX["r",FontSize->18],{1,0.7}],
Text[MaTeX["\\theta",FontSize->16],{0.47,0.12}],
Text[MaTeX["x",FontSize->18],r{0.6Cos[t],0.03}],
Text[MaTeX["y",FontSize->16],r{Cos[t]+0.03,Sin[t]/2}],
Text[MaTeX["x=r\\cos(\\theta)", FontSize->18],{-0.7,0.61}],
Text[MaTeX["y=r\\sin(\\theta)", FontSize->18],{-0.7,0.45}],
Text[MaTeX["x^2+y^2=r^2", FontSize->18],{-0.7,0.25}]
}, Axes -> True, PlotRange->{{-2.2,2.2},{-1.2,1.2}},
Ticks -> False, ImageSize->600]

Export["r_theta_x_y.png",%]

-2{Cos[7Pi/6],Sin[7Pi/6]}

Sqrt[2]{Cos[-3Pi/4],Sin[-3Pi/4]}

Graphics[{PointSize[Large],
{Point[{0,1}], Text[MaTeX["(1,\\pi/2)=(1,5\\pi/2)", FontSize->16],{0.55,1}]},
{Point[{Sqrt[3],1}], Text[MaTeX["(2,\\pi/6) = (-2,7\\pi/6)", FontSize->16],{1.57,0.83}]},
{Point[{-1,-1}], Text[MaTeX["(\\sqrt{2},-3\\pi/4)=(\\sqrt{2},5\\pi/4)", FontSize->16],{-1,-0.85}]}
}, Axes -> True, PlotRange->{{-2.2,2.2},{-1.2,1.2}},
Ticks->None,ImageSize->600,
Ticks-> Table[Table[{x,MaTeX[x]},{x,{-2,-1,1,2}}],{2}]]

Export["polar_points.png",%]

a=1.3;b=3;
alpha=Pi/12;
beta=Pi/3;
dt=(beta-alpha)/12;
dr=(b-a)/12;
alphaRot=Table[0.8{Cos[t],Sin[t]},{t,0,alpha,alpha/10}];
betaRot=Table[3.4{Cos[t],Sin[t]},{t,0,beta,beta/100}];
Graphics[{{Thin,
Line[Table[{a {Cos[t],Sin[t]},b {Cos[t],Sin[t]}},{t,alpha,beta,dt}]],
Table[Circle[{0,0},r,{alpha,beta}],{r,a,b,dr}],
Circle[{0,0},a,{0,Pi/2}],Circle[{0,0},b,{0,Pi/2}],
Arrowheads[0.025],Arrow[alphaRot],Arrow[betaRot]
},{Thick,
Line[{{{0,0},1.2 b {Cos[alpha],Sin[alpha]}},{{0,0},1.2 b {Cos[beta],Sin[beta]}}}],Circle[{0,0},a,{alpha,beta}],Circle[{0,0},b,{alpha,beta}]},
{Text[MaTeX["r=a", FontSize->18],{0.3,1.2}],Text[MaTeX["r=b", FontSize->18],{0.8,2.8}],Text[MaTeX["\\theta=\\alpha", FontSize->18],{0.95,0.12}],
Text[MaTeX["\\theta=\\beta", FontSize->18],{2.6,2.2}, Background -> White]}
},Axes->True, ImageSize->600, Ticks->Table[{{a,MaTeX["a",FontSize->16]},{b,MaTeX["b",FontSize->16]}},{2}]]

Export["polar_region.png",%]

a=0;b=3;
alpha=0;
beta=2Pi;
dt=(beta-alpha)/12;
dr=(b-a)/12;
alphaRot=Table[0.8{Cos[t],Sin[t]},{t,0,alpha,alpha/10}];
betaRot=Table[3.4{Cos[t],Sin[t]},{t,0,beta,beta/100}];
Graphics[{{Thin,
Line[Table[{a {Cos[t],Sin[t]},b {Cos[t],Sin[t]}},{t,alpha,beta,dt}]],
Table[Circle[{0,0},r,{alpha,beta}],{r,a,b,dr}],
Circle[{0,0},a,{0,Pi/2}],Circle[{0,0},b,{0,Pi/2}],
Arrowheads[0.025],Arrow[alphaRot],Arrow[betaRot]
},{Thick,
Line[{{{0,0},1.2 b {Cos[alpha],Sin[alpha]}},{{0,0},1.2 b {Cos[beta],Sin[beta]}}}],Circle[{0,0},a,{alpha,beta}],Circle[{0,0},b,{alpha,beta}]},
{Text[MaTeX["0\\leq\\theta\\leq2\\pi", FontSize->18],{2.7,2.2}, Background -> White]}
},Axes->True, ImageSize->600, Ticks->Table[{{a,MaTeX["a",FontSize->16]},{b,MaTeX["1",FontSize->16]}},{2}]]

Export["unit_disk_bounds.png",%]

a=1;b=3;
alpha=Pi/12;
beta=Pi/3;
dt=(beta-alpha)/12;
dr=(b-a)/12;
r0=a+9*dr;
theta0=alpha+4*dt;Graphics[{
{EdgeForm[],
{LightGray,Disk[{0,0},r0+dr,{theta0,theta0+dt}]},{White,EdgeForm[None],Disk[{0,0},r0,{theta0,theta0+dt}]}},
{Thin,Opacity[0.9],Line[Table[{a {Cos[t],Sin[t]},b {Cos[t],Sin[t]}},{t,alpha,beta,dt}]],Table[Circle[{0,0},r,{alpha,beta}],{r,a,b,dr}]},{Thick,Line[{{{0,0},1.1 b {Cos[alpha],Sin[alpha]}},{{0,0},1.1 b {Cos[beta],Sin[beta]}}}],Circle[{0,0},a,{alpha,beta}],Circle[{0,0},b,{alpha,beta}]},
{Text[MaTeX["\\Delta r", FontSize->16],(r0){Cos[theta0-0.04],Sin[theta0-0.04]},{-1,1/2}],
Text[MaTeX["r \\Delta \\theta", FontSize->16],(0.84r0){Cos[theta0+dt/2],Sin[theta0+dt/2]}]},
Arrow[{(0.88r0){Cos[theta0+dt/2],Sin[theta0+dt/2]},r0{Cos[theta0+dt/2],Sin[theta0+dt/2]}}]
},Axes->True, ImageSize -> 600]

Export["area_element.png",%]

Integrate[(1-r^2)r,{r,0,1},{t,0,2Pi}]

Clear[t]

R=1.4;
Show[{
Plot3D[1.01-2x-y,{x,-R,R},{y,-R/2,R}, BoxRatios->{1,1,1},
PlotStyle->Opacity[0.2], Mesh->None],
Plot3D[1-2x-y,{x,-R,R},{y,-R/2,R}, BoxRatios->{1,1,1},
RegionFunction->Function[{x,y},x^2+y^2<1&&y>0],
Filling->(1->0), Mesh->None],
Graphics3D[{{Opacity[0.2],Blue,
Polygon[{{-R,-R/2,0.01},{R,-R/2,0.01},{R,R,0.01},{-R,R,0.01}}]},
Black,Arrowheads[0.03],Arrow[Tube[{{0,0,-2.3},{0,0,2.9}}]],
Arrow[Tube[{{0,-R/2,0},{0,R,0}}]],Arrow[Tube[{{-R,0,0},{R,0,0}}]]}]
}, Boxed->False, Axes->None]

Table[{x,MaTeX[x]},{x,{-2,2}}]

Graphics[{
{EdgeForm[Black],LightGray,Disk[{0,0},2,{0,Pi}]},
{Thickness[0.0015],Arrow[0.7Table[{Cos[t],Sin[t]},{t,0,Pi,Pi/60}]]},
Text[MaTeX["\\theta=\\pi",FontSize->16],{0.55,0.66}]
}, Axes->True, Ticks->Table[Table[{x,MaTeX[x]},{x,{-2,2}}],{2}],ImageSize->600
]

Export["half_domain.png",%]

Integrate[(1-2x-y)Boole[x^2+y^2<4],{x,-2,2},{y,0,2}]//Expand