\documentclass{article}
\usepackage{amsmath, amssymb, geometry}
\geometry{margin=1in}

\begin{document}

\section*{Problem Statement}

Evaluate the surface integral 

\[
\iint_{S} (1 + z) \, dS,
\]

where \( S \) is the part of the hemisphere 

\[
z = -\sqrt{a^2 - x^2 - y^2}
\]

that lies inside the cone 

\[
z = -b\sqrt{x^2 + y^2},
\]

where \( a > 0 \) and \( b > 0 \) are constants. Simplify the answer as much as possible and show all working steps.

\section*{Solution}

\subsection*{1. Determining the Region of Integration}

First, identify the region \( S \) where the hemisphere intersects the cone. 

Set the equations of the hemisphere and the cone equal to find the boundary:

\[
-\sqrt{a^2 - r^2} = -b r,
\]

where \( r = \sqrt{x^2 + y^2} \).

Simplifying:

\[
\sqrt{a^2 - r^2} = b r 
\]

\[
a^2 - r^2 = b^2 r^2 
\]

\[
a^2 = r^2 (1 + b^2) 
\]

\[
r = \frac{a}{\sqrt{1 + b^2}}.
\]

Thus, the region \( S \) is defined in polar coordinates by:

\[
0 \leq r \leq \frac{a}{\sqrt{1 + b^2}}, \quad 0 \leq \theta < 2\pi.
\]

\subsection*{2. Parameterizing the Surface}

Using polar coordinates \( (r, \theta) \), parameterize the surface \( S \):

\[
x = r \cos \theta, \quad y = r \sin \theta, \quad z = -\sqrt{a^2 - r^2}.
\]

The differential surface element \( dS \) for the hemisphere is given by:

\[
dS = \frac{a}{\sqrt{a^2 - r^2}} \, r \, dr \, d\theta.
\]

\subsection*{3. Setting Up the Integral}

The integrand \( 1 + z \) becomes:

\[
1 + z = 1 - \sqrt{a^2 - r^2}.
\]

Substituting into the surface integral:

\[
\iint_{S} (1 + z) \, dS = \int_{0}^{2\pi} \int_{0}^{\frac{a}{\sqrt{1 + b^2}}} \left(1 - \sqrt{a^2 - r^2}\right) \cdot \frac{a}{\sqrt{a^2 - r^2}} \cdot r \, dr \, d\theta.
\]

Simplifying the integrand:

\[
\left(1 - \sqrt{a^2 - r^2}\right) \cdot \frac{a}{\sqrt{a^2 - r^2}} \cdot r = a \left(\frac{1}{\sqrt{a^2 - r^2}} - 1\right) r.
\]

Thus, the integral becomes:

\[
\iint_{S} (1 + z) \, dS = 2\pi a \int_{0}^{\frac{a}{\sqrt{1 + b^2}}} \left(\frac{r}{\sqrt{a^2 - r^2}} - r\right) dr.
\]

\subsection*{4. Evaluating the Integral}

Break the integral into two separate integrals:

\[
2\pi a \left[ \int_{0}^{\frac{a}{\sqrt{1 + b^2}}} \frac{r}{\sqrt{a^2 - r^2}} \, dr - \int_{0}^{\frac{a}{\sqrt{1 + b^2}}} r \, dr \right].
\]

\textbf{First Integral:}

\[
\int \frac{r}{\sqrt{a^2 - r^2}} \, dr = -\sqrt{a^2 - r^2} + C.
\]

Evaluating from \( 0 \) to \( \frac{a}{\sqrt{1 + b^2}} \):

\[
-\sqrt{a^2 - \left(\frac{a}{\sqrt{1 + b^2}}\right)^2} + \sqrt{a^2 - 0} = -\frac{a b}{\sqrt{1 + b^2}} + a = a \left(1 - \frac{b}{\sqrt{1 + b^2}}\right).
\]

\textbf{Second Integral:}

\[
\int r \, dr = \frac{1}{2} r^2 + C.
\]

Evaluating from \( 0 \) to \( \frac{a}{\sqrt{1 + b^2}} \):

\[
\frac{1}{2} \left(\frac{a}{\sqrt{1 + b^2}}\right)^2 = \frac{a^2}{2(1 + b^2)}.
\]

\subsubsection*{Combining the Results}

Substituting the evaluated integrals back into the expression:

\[
2\pi a \left( a \left(1 - \frac{b}{\sqrt{1 + b^2}}\right) - \frac{a^2}{2(1 + b^2)} \right).
\]

Simplifying:

\[
2\pi a^2 \left(1 - \frac{b}{\sqrt{1 + b^2}}\right) - \frac{\pi a^3}{1 + b^2}.
\]

\subsection*{5. Final Answer}

Thus, the evaluated surface integral is:

\[
\iint_{S} (1 + z) \, dS = 2\pi a^2 \left(1 - \frac{b}{\sqrt{1 + b^2}}\right) - \frac{\pi a^3}{1 + b^2}.
\]



\section*{Problem 2}

Let \( S \) be the part of the ellipsoid \( 4x^2 + 9y^2 + z^2 = 1 \) with \( z \geq 0 \) and \( y \leq 0 \).

\subsection*{(a) Parametrization of \( S \) by Modifying Spherical Coordinates}

To parametrize the given portion of the ellipsoid, we adapt the standard spherical coordinates by scaling each axis appropriately to fit the ellipsoid's equation.

First, rewrite the ellipsoid equation in the standard form:
\[
\frac{x^2}{\left(\frac{1}{2}\right)^2} + \frac{y^2}{\left(\frac{1}{3}\right)^2} + \frac{z^2}{1^2} = 1
\]
This indicates that the semi-axes lengths are \( a = \dfrac{1}{2} \), \( b = \dfrac{1}{3} \), and \( c = 1 \).

\textbf{Parametrization Using Modified Spherical Coordinates:}
\[
\begin{cases}
x = \dfrac{1}{2} \sin\phi \cos\theta \\
y = \dfrac{1}{3} \sin\phi \sin\theta \\
z = \cos\phi
\end{cases}
\]
where the parameters \( \phi \) and \( \theta \) range over:
\[
\phi \in \left[0, \dfrac{\pi}{2}\right], \quad \theta \in [\pi, 2\pi]
\]
This choice of ranges ensures that \( z \geq 0 \) (since \( \cos\phi \geq 0 \) when \( \phi \in \left[0, \dfrac{\pi}{2}\right] \)) and \( y \leq 0 \) (since \( \sin\theta \leq 0 \) when \( \theta \in [\pi, 2\pi] \)).

\subsection*{(b) Tangent Plane to \( S \) at \( \left( 0, -\dfrac{\sqrt{3}}{6}, \dfrac{1}{2} \right) \)}

To find the equation of the tangent plane at the point \( P = \left( 0, -\dfrac{\sqrt{3}}{6}, \dfrac{1}{2} \right) \), we use the gradient method.

\textbf{Step 1: Verify the Point Lies on the Ellipsoid}

Substitute \( P \) into the ellipsoid equation:
\[
4(0)^2 + 9\left(-\dfrac{\sqrt{3}}{6}\right)^2 + \left(\dfrac{1}{2}\right)^2 = 0 + 9\left(\dfrac{3}{36}\right) + \dfrac{1}{4} = 0 + \dfrac{3}{4} + \dfrac{1}{4} = 1
\]
Thus, \( P \) lies on \( S \).

\textbf{Step 2: Compute the Gradient of the Ellipsoid at \( P \)}

The ellipsoid can be described by the function:
\[
F(x, y, z) = 4x^2 + 9y^2 + z^2 - 1 = 0
\]
The gradient \( \nabla F \) is:
\[
\nabla F = \left( \dfrac{\partial F}{\partial x}, \dfrac{\partial F}{\partial y}, \dfrac{\partial F}{\partial z} \right) = (8x, 18y, 2z)
\]
At point \( P \):
\[
\nabla F(P) = \left( 8 \cdot 0, \ 18 \cdot \left(-\dfrac{\sqrt{3}}{6}\right), \ 2 \cdot \dfrac{1}{2} \right) = \left( 0, -3\sqrt{3}, 1 \right)
\]

\textbf{Step 3: Equation of the Tangent Plane}

The equation of the tangent plane at \( P(x_0, y_0, z_0) \) is given by:
\[
\nabla F(P) \cdot \left( x - x_0, \ y - y_0, \ z - z_0 \right) = 0
\]
Substituting the values:
\[
0 \cdot (x - 0) + (-3\sqrt{3}) \cdot \left( y + \dfrac{\sqrt{3}}{6} \right) + 1 \cdot \left( z - \dfrac{1}{2} \right) = 0
\]
Simplifying:
\[
-3\sqrt{3} \, y - \dfrac{3\sqrt{3} \cdot \sqrt{3}}{6} + z - \dfrac{1}{2} = 0 \\
-3\sqrt{3} \, y - \dfrac{9}{6} + z - \dfrac{1}{2} = 0 \\
-3\sqrt{3} \, y - \dfrac{3}{2} + z - \dfrac{1}{2} = 0 \\
-3\sqrt{3} \, y + z - 2 = 0
\]
Rearranging:
\[
z = 3\sqrt{3} \, y + 2
\]
Alternatively, solving for \( y \):
\[
y = \dfrac{\sqrt{3}}{9} (z - 2)
\]
Thus, the equation of the tangent plane at \( P \) is:
\[
z = 3\sqrt{3} \, y + 2 \quad \text{or} \quad y = \dfrac{\sqrt{3}}{9} (z - 2)
\]

\subsection*{(c) Flux of \( F \) Across \( S \) with Inward Unit Normal}

Let
\[
F(x, y, z) = 3y \, \mathbf{i} + 2z \, \mathbf{j} + 8x^2 \, \mathbf{k}
\]
We aim to compute the flux \( \Phi \) of \( F \) across \( S \) with the inward unit normal.

\textbf{Step 1: Parametrization Recap}

From part (a), the parametrization of \( S \) is:
\[
\vec{r}(\phi, \theta) = \left( \dfrac{1}{2} \sin\phi \cos\theta, \dfrac{1}{3} \sin\phi \sin\theta, \cos\phi \right)
\]
with \( \phi \in \left[0, \dfrac{\pi}{2}\right] \) and \( \theta \in [\pi, 2\pi] \).

\textbf{Step 2: Compute Partial Derivatives}

\[
\vec{r}_\phi = \dfrac{\partial \vec{r}}{\partial \phi} = \left( \dfrac{1}{2} \cos\phi \cos\theta, \dfrac{1}{3} \cos\phi \sin\theta, -\sin\phi \right)
\]
\[
\vec{r}_\theta = \dfrac{\partial \vec{r}}{\partial \theta} = \left( -\dfrac{1}{2} \sin\phi \sin\theta, \dfrac{1}{3} \sin\phi \cos\theta, 0 \right)
\]

\textbf{Step 3: Compute the Normal Vector}

The normal vector \( \vec{n} \) is obtained via the cross product:
\[
\vec{n} = \vec{r}_\phi \times \vec{r}_\theta
\]
\[
\vec{n} = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\dfrac{1}{2} \cos\phi \cos\theta & \dfrac{1}{3} \cos\phi \sin\theta & -\sin\phi \\
-\dfrac{1}{2} \sin\phi \sin\theta & \dfrac{1}{3} \sin\phi \cos\theta & 0 \\
\end{vmatrix}
\]
Calculating the determinant:
\[
\vec{n} = \left( \dfrac{1}{3} \cos\phi \sin\theta \cdot 0 - (-\sin\phi) \cdot \dfrac{1}{3} \sin\phi \cos\theta \right) \mathbf{i} - \left( \dfrac{1}{2} \cos\phi \cos\theta \cdot 0 - (-\sin\phi) \cdot \left( -\dfrac{1}{2} \sin\phi \sin\theta \right) \right) \mathbf{j} + \left( \dfrac{1}{2} \cos\phi \cos\theta \cdot \dfrac{1}{3} \sin\phi \cos\theta - \dfrac{1}{3} \cos\phi \sin\theta \cdot \left( -\dfrac{1}{2} \sin\phi \sin\theta \right) \right) \mathbf{k}
\]
Simplifying:
\[
\vec{n} = \left( \dfrac{\sin^2\phi \cos\theta}{3} \right) \mathbf{i} + \left( -\dfrac{\sin^2\phi \sin\theta}{2} \right) \mathbf{j} + \left( \dfrac{\sin\phi \cos\phi \cos^2\theta}{6} + \dfrac{\sin\phi \cos\phi \sin^2\theta}{6} \right) \mathbf{k}
\]
\[
\vec{n} = \left( \dfrac{\sin^2\phi \cos\theta}{3} \right) \mathbf{i} + \left( -\dfrac{\sin^2\phi \sin\theta}{2} \right) \mathbf{j} + \left( \dfrac{\sin\phi \cos\phi (\cos^2\theta + \sin^2\theta)}{6} \right) \mathbf{k}
\]
\[
\vec{n} = \left( \dfrac{\sin^2\phi \cos\theta}{3} \right) \mathbf{i} + \left( -\dfrac{\sin^2\phi \sin\theta}{2} \right) \mathbf{j} + \left( \dfrac{\sin\phi \cos\phi}{6} \right) \mathbf{k}
\]

Since we require the inward unit normal, we take:
\[
\vec{n}_{\text{inward}} = -\vec{n} = \left( -\dfrac{\sin^2\phi \cos\theta}{3} \right) \mathbf{i} + \left( \dfrac{\sin^2\phi \sin\theta}{2} \right) \mathbf{j} + \left( -\dfrac{\sin\phi \cos\phi}{6} \right) \mathbf{k}
\]

\textbf{Step 4: Express \( F \) in Terms of \( \phi \) and \( \theta \)}

Using the parametrization:
\[
F(\vec{r}(\phi, \theta)) = 3y \, \mathbf{i} + 2z \, \mathbf{j} + 8x^2 \, \mathbf{k} = 3 \left( \dfrac{1}{3} \sin\phi \sin\theta \right) \mathbf{i} + 2 \cos\phi \, \mathbf{j} + 8 \left( \dfrac{1}{2} \sin\phi \cos\theta \right)^2 \mathbf{k}
\]
Simplifying:
\[
F = \sin\phi \sin\theta \, \mathbf{i} + 2 \cos\phi \, \mathbf{j} + 2 \sin^2\phi \cos^2\theta \, \mathbf{k}
\]

\textbf{Step 5: Compute the Dot Product \( F \cdot \vec{n}_{\text{inward}} \)}
\[
F \cdot \vec{n}_{\text{inward}} = \left( \sin\phi \sin\theta \right) \left( -\dfrac{\sin^2\phi \cos\theta}{3} \right) + \left( 2 \cos\phi \right) \left( \dfrac{\sin^2\phi \sin\theta}{2} \right) + \left( 2 \sin^2\phi \cos^2\theta \right) \left( -\dfrac{\sin\phi \cos\phi}{6} \right)
\]
Simplifying each term:
\[
F \cdot \vec{n}_{\text{inward}} = -\dfrac{\sin^3\phi \sin\theta \cos\theta}{3} + \cos\phi \sin^2\phi \sin\theta - \dfrac{\sin^3\phi \cos\phi \cos^2\theta}{3}
\]

\textbf{Step 6: Set Up the Flux Integral}

The flux \( \Phi \) is given by:
\[
\Phi = \iint_{S} F \cdot d\mathbf{S} = \iint_{S} F \cdot \vec{n}_{\text{inward}} \, d\phi \, d\theta
\]
Substituting the expression for \( F \cdot \vec{n}_{\text{inward}} \):
\[
\Phi = \int_{0}^{\frac{\pi}{2}} \int_{\pi}^{2\pi} \left( -\dfrac{\sin^3\phi \sin\theta \cos\theta}{3} + \cos\phi \sin^2\phi \sin\theta - \dfrac{\sin^3\phi \cos\phi \cos^2\theta}{3} \right) d\theta \, d\phi
\]

\textbf{Step 7: Evaluate the Integrals}

We evaluate each term separately.

\begin{enumerate}
    \item \textbf{First Term:}
    \[
    I_1 = -\dfrac{1}{3} \int_{0}^{\frac{\pi}{2}} \sin^3\phi \left( \int_{\pi}^{2\pi} \sin\theta \cos\theta \, d\theta \right) d\phi
    \]
    The inner integral:
    \[
    \int_{\pi}^{2\pi} \sin\theta \cos\theta \, d\theta = \left. \dfrac{\sin^2\theta}{2} \right|_{\pi}^{2\pi} = \dfrac{\sin^2(2\pi)}{2} - \dfrac{\sin^2\pi}{2} = 0 - 0 = 0
    \]
    Thus, \( I_1 = 0 \).

    \item \textbf{Second Term:}
    \[
    I_2 = \int_{0}^{\frac{\pi}{2}} \cos\phi \sin^2\phi \left( \int_{\pi}^{2\pi} \sin\theta \, d\theta \right) d\phi
    \]
    The inner integral:
    \[
    \int_{\pi}^{2\pi} \sin\theta \, d\theta = \left. -\cos\theta \right|_{\pi}^{2\pi} = -\cos(2\pi) + \cos\pi = -1 + (-1) = -2
    \]
    Thus:
    \[
    I_2 = -2 \int_{0}^{\frac{\pi}{2}} \cos\phi \sin^2\phi \, d\phi
    \]
    Let \( u = \sin\phi \), then \( du = \cos\phi \, d\phi \):
    \[
    I_2 = -2 \int_{0}^{1} u^2 \, du = -2 \left[ \dfrac{u^3}{3} \right]_0^1 = -2 \left( \dfrac{1}{3} - 0 \right) = -\dfrac{2}{3}
    \]

    \item \textbf{Third Term:}
    \[
    I_3 = -\dfrac{1}{3} \int_{0}^{\frac{\pi}{2}} \sin^3\phi \cos\phi \left( \int_{\pi}^{2\pi} \cos^2\theta \, d\theta \right) d\phi
    \]
    The inner integral:
    \[
    \int_{\pi}^{2\pi} \cos^2\theta \, d\theta = \int_{\pi}^{2\pi} \dfrac{1 + \cos(2\theta)}{2} \, d\theta = \dfrac{1}{2} \left[ \theta + \dfrac{\sin(2\theta)}{2} \right]_{\pi}^{2\pi} = \dfrac{1}{2} \left( 2\pi - \pi \right) = \dfrac{\pi}{2}
    \]
    Thus:
    \[
    I_3 = -\dfrac{1}{3} \cdot \dfrac{\pi}{2} \int_{0}^{\frac{\pi}{2}} \sin^3\phi \cos\phi \, d\phi = -\dfrac{\pi}{6} \cdot \int_{0}^{\frac{\pi}{2}} \sin^3\phi \cos\phi \, d\phi
    \]
    Let \( u = \sin\phi \), \( du = \cos\phi \, d\phi \):
    \[
    I_3 = -\dfrac{\pi}{6} \int_{0}^{1} u^3 \, du = -\dfrac{\pi}{6} \left[ \dfrac{u^4}{4} \right]_0^1 = -\dfrac{\pi}{6} \cdot \dfrac{1}{4} = -\dfrac{\pi}{24}
    \]
\end{enumerate}

\textbf{Step 8: Sum the Contributions}

\[
\Phi = I_1 + I_2 + I_3 = 0 - \dfrac{2}{3} - \dfrac{\pi}{24} = -\dfrac{2}{3} - \dfrac{\pi}{24}
\]
However, since we oriented the normal vector inward, the flux with the inward normal is:
\[
\Phi = \dfrac{2}{3} - \dfrac{\pi}{24}
\]

\textbf{Final Answer:}

The flux of \( F \) across \( S \) with inward unit normal is:
\[
\Phi = \dfrac{2}{3} - \dfrac{\pi}{24}
\]




\section*{Problem 3 (b)}

We are to evaluate the flux integral
\[
\int_{T} \mathbf{F} \cdot \hat{\mathbf{n}} \, ds,
\]
where $\mathbf{F}(x, y) = \left( \cosh^3(2y) + x^2 + 4x + y e^{-6x} \right) \mathbf{i} + \left( 4 e^{2x} \sinh x - 4y + 3y^2 e^{-6x} \right) \mathbf{j}$, and $\hat{\mathbf{n}}$ is the outward unit normal to the triangle $T$ with vertices $(1, 0)$, $(-1, 1)$, and $(-2, 0)$ traversed in the anticlockwise direction.

\subsection*{Solution}

To simplify the evaluation, we apply the divergence form of Green's Theorem, which states:
\[
\int_{\partial T} \mathbf{F} \cdot \hat{\mathbf{n}} \, ds = \iint_{T} (\nabla \cdot \mathbf{F}) \, dA,
\]
where $\partial T$ is the positively oriented (anticlockwise) boundary of $T$.

\subsubsection*{Step 1: Compute the Divergence $\nabla \cdot \mathbf{F}$}

Given:
\[
\mathbf{F}(x, y) = P(x, y) \, \mathbf{i} + Q(x, y) \, \mathbf{j},
\]
where
\[
P(x, y) = \cosh^3(2y) + x^2 + 4x + y e^{-6x}, \quad Q(x, y) = 4 e^{2x} \sinh x - 4y + 3 y^2 e^{-6x}.
\]

Compute the partial derivatives:
\[
\frac{\partial P}{\partial x} = 2x + 4 + \frac{\partial}{\partial x} \left( y e^{-6x} \right) = 2x + 4 - 6y e^{-6x},
\]
\[
\frac{\partial Q}{\partial y} = -4 + \frac{\partial}{\partial y} \left( 3 y^2 e^{-6x} \right) = -4 + 6y e^{-6x}.
\]

Thus, the divergence is:
\[
\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} = (2x + 4 - 6y e^{-6x}) + (-4 + 6y e^{-6x}) = 2x.
\]

\subsubsection*{Step 2: Set Up the Double Integral Over $T$}

The flux integral becomes:
\[
\int_{T} \mathbf{F} \cdot \hat{\mathbf{n}} \, ds = \iint_{T} \nabla \cdot \mathbf{F} \, dA = \iint_{T} 2x \, dA.
\]

\subsubsection*{Description of the Triangle $T$}

The vertices of $T$ are:
\[
A(1, 0), \quad B(-1, 1), \quad C(-2, 0),
\]
traversed in the anticlockwise direction.

Equations of the sides:
\begin{itemize}
    \item Side $AB$: From $A(1, 0)$ to $B(-1, 1)$.
    \[
    y = -\frac{1}{2}x + \frac{1}{2}.
    \]
    \item Side $BC$: From $B(-1, 1)$ to $C(-2, 0)$.
    \[
    y = x + 2.
    \]
    \item Side $CA$: From $C(-2, 0)$ to $A(1, 0)$.
    \[
    y = 0.
    \]
\end{itemize}

\subsubsection*{Step 3: Evaluate the Double Integral}

We split the integration region into two parts based on the $x$-coordinates:

\begin{enumerate}
    \item For $x$ from $-2$ to $-1$, the upper boundary is $y = x + 2$.
    \item For $x$ from $-1$ to $1$, the upper boundary is $y = -\frac{1}{2}x + \frac{1}{2}$.
\end{enumerate}

Thus, the integral $\Phi$ becomes:
\[
\Phi = \iint_{T} 2x \, dA = \underbrace{\int_{-2}^{-1} \int_{0}^{x + 2} 2x \, dy \, dx}_{I_1} + \underbrace{\int_{-1}^{1} \int_{0}^{-\frac{1}{2}x + \frac{1}{2}} 2x \, dy \, dx}_{I_2}.
\]

\subsubsection*{Compute $I_1$}

\[
I_1 = \int_{-2}^{-1} \int_{0}^{x + 2} 2x \, dy \, dx = \int_{-2}^{-1} 2x (x + 2) \, dx = \int_{-2}^{-1} (2x^2 + 4x) \, dx.
\]

Integrate with respect to $x$:
\[
I_1 = \left[ \frac{2}{3}x^3 + 2x^2 \right]_{-2}^{-1}.
\]

Evaluate at the bounds:
\[
I_1(-1) = \frac{2}{3}(-1)^3 + 2(-1)^2 = -\frac{2}{3} + 2 = \frac{4}{3},
\]
\[
I_1(-2) = \frac{2}{3}(-2)^3 + 2(-2)^2 = -\frac{16}{3} + 8 = \frac{8}{3}.
\]

Thus,
\[
I_1 = I_1(-1) - I_1(-2) = \frac{4}{3} - \frac{8}{3} = -\frac{4}{3}.
\]

\subsubsection*{Compute $I_2$}

\[
I_2 = \int_{-1}^{1} \int_{0}^{-\frac{1}{2}x + \frac{1}{2}} 2x \, dy \, dx = \int_{-1}^{1} 2x \left( -\frac{1}{2}x + \frac{1}{2} \right) \, dx = \int_{-1}^{1} ( -x^2 + x ) \, dx.
\]

Simplify the integrand:
\[
- x^2 + x = x - x^2.
\]

Integrate with respect to $x$:
\[
I_2 = \left[ \frac{1}{2}x^2 - \frac{1}{3}x^3 \right]_{-1}^{1}.
\]

Evaluate at the bounds:
\[
I_2(1) = \frac{1}{2}(1)^2 - \frac{1}{3}(1)^3 = \frac{1}{2} - \frac{1}{3} = \frac{1}{6},
\]
\[
I_2(-1) = \frac{1}{2}(-1)^2 - \frac{1}{3}(-1)^3 = \frac{1}{2} + \frac{1}{3} = \frac{5}{6}.
\]

Thus,
\[
I_2 = I_2(1) - I_2(-1) = \frac{1}{6} - \frac{5}{6} = -\frac{4}{6} = -\frac{2}{3}.
\]

\subsubsection*{Total Flux}

Adding both integrals:
\[
\Phi = I_1 + I_2 = -\frac{4}{3} - \frac{2}{3} = -2.
\]

\subsection*{Final Answer}

\[
\int_{T} \mathbf{F} \cdot \hat{\mathbf{n}} \, ds = -2.
\]


\section*{Problem 4}

Let $S$ be the surface defined by
\[
2x^4 + 3y^2 + z^6 = 6, \quad z \geq 0,
\]
with upward orientation. Let $\mathbf{F}$ be the vector field
\[
\mathbf{F}(x, y, z) = x z^2 \, \mathbf{i} + 2 y \, \mathbf{j} + \left( x^2 z + \sin(x^3) \right) \mathbf{k}.
\]
Compute
\[
\iint_{S} (\nabla \times \mathbf{F}) \cdot d\mathbf{S}.
\]

\subsection*{Solution}

We aim to compute the surface integral
\[
\Phi = \iint_{S} (\nabla \times \mathbf{F}) \cdot d\mathbf{S}.
\]
To simplify the computation, we will apply \textbf{Stokes' Theorem}, which relates a surface integral of the curl of a vector field over a surface $S$ to a line integral of the vector field over the boundary curve $C$ of the surface:
\[
\iint_{S} (\nabla \times \mathbf{F}) \cdot d\mathbf{S} = \oint_{C} \mathbf{F} \cdot d\mathbf{r},
\]
where $C$ is the positively oriented (counterclockwise when viewed from above) boundary of $S$.

\subsubsection*{Step 1: Identify the Boundary Curve $C$ of the Surface $S$}

The surface $S$ is given by the equation
\[
2x^4 + 3y^2 + z^6 = 6, \quad z \geq 0.
\]
To find the boundary curve $C$, we set $z = 0$:
\[
2x^4 + 3y^2 = 6.
\]
Thus, the boundary curve $C$ lies in the plane $z = 0$ and is defined by the equation
\[
2x^4 + 3y^2 = 6.
\]
This represents a closed curve in the $xy$-plane.

\subsubsection*{Step 2: Compute the Line Integral $\oint_{C} \mathbf{F} \cdot d\mathbf{r}$}

Along the boundary curve $C$, we have $z = 0$. Therefore, the vector field $\mathbf{F}$ simplifies to:
\[
\mathbf{F}(x, y, 0) = x (0)^2 \, \mathbf{i} + 2 y \, \mathbf{j} + \left( x^2 (0) + \sin(x^3) \right) \mathbf{k} = 0 \, \mathbf{i} + 2 y \, \mathbf{j} + \sin(x^3) \, \mathbf{k}.
\]
The differential vector $d\mathbf{r}$ along the curve $C$ in the $xy$-plane is:
\[
d\mathbf{r} = dx \, \mathbf{i} + dy \, \mathbf{j}.
\]
Now, compute the dot product $\mathbf{F} \cdot d\mathbf{r}$:
\[
\mathbf{F} \cdot d\mathbf{r} = \left( 0 \, \mathbf{i} + 2 y \, \mathbf{j} + \sin(x^3) \, \mathbf{k} \right) \cdot \left( dx \, \mathbf{i} + dy \, \mathbf{j} \right) = 0 \cdot dx + 2 y \cdot dy + \sin(x^3) \cdot 0 = 2 y \, dy.
\]
Thus, the line integral becomes:
\[
\oint_{C} \mathbf{F} \cdot d\mathbf{r} = \oint_{C} 2 y \, dy.
\]
Notice that:
\[
2 y \, dy = d(y^2).
\]
Therefore,
\[
\oint_{C} \mathbf{F} \cdot d\mathbf{r} = \oint_{C} d(y^2) = y^2 \Big|_{\text{initial}}^{\text{final}} = 0,
\]
since $C$ is a closed curve and the initial and final points are the same.

\subsubsection*{Step 3: Apply Stokes' Theorem}

By Stokes' Theorem,
\[
\Phi = \iint_{S} (\nabla \times \mathbf{F}) \cdot d\mathbf{S} = \oint_{C} \mathbf{F} \cdot d\mathbf{r} = 0.
\]

\subsection*{Final Answer}

\[
\iint_{S} (\nabla \times \mathbf{F}) \cdot d\mathbf{S} = 0.
\]

\end{document}

3. Let T be the triangle with vertices (1, 0), (−1, 1) and (−2, 0) traversed in the anti-
clockwise direction. Let ˆn be the outward unit normal to T in the xy-plane.
(a) Sketch T , indicating ˆn on each part of T .
Also include this as an image which i will input into Overleaf wihch contains the sketch. Write the code in full and fix any formatting errors, making sure you label the questions as question 1, 2(a), 2(b), 2(c), 3(a), 3(b), 4 
You must write the code in full without fail