Title: SCRATCH
Course: HELM Workbooks 2023-2024

"The category 'SCRATCH' contains 20 questions (some of which may be hidden questions or random questions that are still in use in a quiz)."

Exercise

Compute the improper integral. If it convergent evaluate it, otherwise enter the value none as your answer. \[ I = \int_{[value]}^{[value]} \textrm{e}^{-x} [value] \, \textrm{d}x. \] \( I = \)

Give your answer in exact form.
Feedback: We have the integral: \[ I = \int_{0}^{\infty} \textrm{e}^{-x} {[value]} \, \textrm{d}x.\] We can use integration by parts: \(\displaystyle\int_a^{b} u(x)v'(x) \, \textrm{d}x = [u(x)v(x)]_a^b -\int_{a}^{b} u'(x)v(x) \, \textrm{d}x\) We have: \(u(x)=\textrm{e}^{-x} \Rightarrow u'(x)=-\textrm{e}^{-x}\) and \(v'(x)= [value] \Rightarrow v(x)= -\frac{1}{[value]} \cos({[value]}x)\) So our integral becomse: \begin{eqnarray*} I = \int_{[value]}^{\infty} \textrm{e}^{-x} {[value]} \, \textrm{d}x & = & \bigg/_{\!\!\!\!0}^{\,\infty} -\textrm{e}^{-x} \cdot \frac{1}{[value]} \cdot \cos([value]x)-\int_{0}^{\infty} \textrm{e}^{-x} \cdot \frac{1}{[value]}\cos([value]x) \, \textrm{d}x \\ & = & \frac{1}{[value]}-\frac{1}{[value]} \int_{0}^{\infty} \textrm{e}^{-x} \cos([value]x) \, \textrm{d}x \end{eqnarray*} Applying integration by parts again, we get: \(u(x)=\textrm{e}^{-x} \Rightarrow u'(x)=-\textrm{e}^{-x} \) and \(v'(x)= \cos([value]x) \Rightarrow v(x)=\frac{1}{[value]} \sin([value]x)\) So our initial integral becomes: \begin{eqnarray*} I = \frac{1}{[value]}-\frac{1}{[value]} \int_{0}^{\infty} \textrm{e}^{-x} \cos([value]x) \, \textrm{d}x & = & \frac{1}{[value]}-\frac{1}{[value]} \bigg(\bigg/_{\!\!\!\!0}^{\,\infty} \frac{1}{[value]} \textrm{e}^{-x} \sin([value]x)-\int_{0}^{\infty} -\textrm{e}^{-x}\cdot \frac{1}{[value]} \sin([value]x) \, \textrm{d}x \bigg) \\ & = & \frac{1}{[value]}-\frac{1}{[value]} \bigg( 0+ \frac{1}{[value]} \int_{0}^{\infty} \textrm{e}^{-x} \sin({[value]}x) \, \textrm{d}x \bigg) \\ & = & \frac{1}{[value]}-\frac{1}{[value]}\int_{0}^{\infty} \textrm{e}^{-x} \sin([value]x) \, \textrm{d}x. \end{eqnarray*} Whoa! The original integrand appeared also on the right hand side of the equation! Let us move it to the left side. \begin{eqnarray*} \int_{0}^{\infty} \textrm{e}^{-x}\sin([value]x) \, \textrm{d}x+\frac{1}{[value]} \int_{0}^{\infty} \textrm{e}^{-x}\sin([value]x) \, \textrm{d}x & = & \frac{1}{[value]} \\ [value] \int_{0}^{\infty} \textrm{e}^{-x} \sin([value]x) \, \textrm{d}x & = & \frac{1}{[value]} \\ \int_{0}^{\infty} \textrm{e}^{-x} \sin([value]x) \, \textrm{d}x & = & [value]. \end{eqnarray*}

Exercise

Compute the improper integral. If it convergent evaluate it, otherwise enter the value none as your answer. \[ I = \int_0^{\infty} [value] dx. \]

\( I = \)

Give your answer in exact form.
Feedback: We have the integral: \[ I = \int_0^{\infty} [value] dx = \lim_{t \rightarrow \infty} \int_0^{t} [value] dx = \lim_{t \rightarrow \infty} \left[ [value]\right]_0^{t} = \lim_{t \rightarrow \infty} (e^{t^2}/2-1/2) \] Note that to preform the integral \(\int_0^t xe^{x^2} dx\) we use the substitution \(u(x)=x^2\) so that \(du=2xdx\) and our integral becomes \[\int_0^t xe^{x^2} dx=\int_{0}^{t^2} \frac{e^{u}}{2} du = \left[\frac{e^{u}}{2}\right]_0^{t^2}=\left[\frac{e^{x^2}}{2}\right]_0^{t}.\] The integral is divergent as \(\lim_{t \rightarrow \infty} e^{t^2}/2\) diverges to infinity.

Exercise

Decide if the following statements are correct or wrong:

1. If \( p >1\), then \( \displaystyle{\int_1^\infty \frac{1}{x^p} dx = \frac{1}{p-1}.}\)
2. If \( p <1\), then \(\displaystyle{ \int_0^1 \frac{1}{x^p} dx = \frac{1}{1-p}.}\)
Feedback: In the first case \( \displaystyle{\int_1^\infty \frac{1}{x^p} dx} = \displaystyle{ \lim_{t\to \infty} \int_1^t \frac{1}{x^p} dx} = \displaystyle{ \lim_{t\to \infty} [x^{-p+1}/(-p+1)]_1^t}\) So we have \( \lim_{t \to \infty} t^{-p+1}/(-p+1)-1/(-p+1)\) and since \(p>1\) we have \(-p+1<0\) so \(t^{-p+1} \to 0\) as \(t \to \infty\). The other case should be similar except we have \(\displaystyle{ \lim_{t\to 0+} \int_t^1 \frac{1}{x^p} dx}\) and of course \(p<1\) so that \(-p+1>0\).

Find the extremum of \[ f(x,y) = [value] \] subject to the constraint \( y = [value].\)

The extemum is at the point: \( \big( \) ,  \( \big) .\)

and has value \( f_{ex} = \)
Feedback: We have the function \( f(x,y) = [value] \) subject to the constraint \( y = [value].\) In this question it is easy to eliminate the \(y\) variable. We can write \(f\) as: \[ f(x) = [value]\] Differentiating gives \( f'(x) = [value] .\) An extremal value occurs when \(f'(x) = 0 \Rightarrow x= [value] \) for which \( y = [value].\) The extemum is at the point: \( ([value], [value] ).\) The value of the function at that point is \( f([value]) = [value].\)

Use Lagrange multipliers to find the distance from the point \( P=([value],[value],[value]) \) to the plane [value] as follows.

Let \(f(x,y,z)\) be the square of the distance from \( (x,y,z) \) to \( P=([value],[value],[value]) \).

\( f(x,y,x) = \)

Let \( g(x,y,z)=0 \) be the constraint that \((x,y,z)\) lies on [value]. We define the Lagrangian \[ L= f(x,y,z) + lg(x,y,z)\]

Calculate \( \frac{\partial L}{\partial x} = \)

Calculate \( \frac{\partial L}{\partial l} = \)

Solve the equations \( \frac{\partial L}{\partial x} = 0\), \( \frac{\partial L}{\partial y} = 0\), \( \frac{\partial L}{\partial z} = 0\), \( \frac{\partial L}{\partial l} = 0\), and find the value of \(l\).

\( l= \)

Hence, find the shortest distance from the point to the plane.

Shortest distance is
Feedback: We define \[ L= f(x,y,z) + lg(x,y,z)\] In our case this gives us \[ L = [value] - l([value]).\] Now we calculate the derivatives as \[ \frac{\partial L}{\partial x} = [value]\] \[ \frac{\partial L}{\partial y} = [value]\] \[ \frac{\partial L}{\partial z} = [value]\] \[ \frac{\partial L}{\partial l} = [value]\] Now we need to equate to zero and solve this system of algebraic equations. \[ [value]=0,\quad [value]=0,\quad [value]=0,\quad [value]=0.\] In this case, we can solve for \(x\), \(y\) and \(z\) which give us solutions in terms of \(l\). \[ [value] \] \[ [value] \] \[ [value] \] When we use these values in \([value]=0\) we get \[ [value]=0.\] Although this looks complicated it is a linear equation in \(l\) which we can readily solve to give \([value]\). So, this gives the actual values of \(x\), \(y\) and \(z\) as \[ [value]\] \[ [value]\] \[ [value]\] Now, we need to evaluate \(f\) at this point to give us the square of the distance. \[ f(x,y,z) = [value]\] So, the closest distance of \( P=([value],[value],[value]) \) to the plane [value] is [value].

Find the maximum and minimum values of \[f([value],[value])=[value]\] subject to \[ [value].\] Write the Lagrange function in the form \(f([value],[value]) - \lambda g([value],[value])\).

(a) For which values of \([value]\) do critical points of \( f- \lambda g\) occur?

\( x = \)

(b) The maximum/minimum of \(f([value],[value])=[value]\) subject to \( [value]\) is

\(\mbox{max} = \)

\(\mbox{min} = \)
Feedback: To find the maximum and minimum values of \[f([value],[value])=[value]\] subject to \( [value]\) we use the method of Lagrange multipliers. In general we have the function \(f([value],[value])\) and the constraint \(g([value],[value]) = [value]=0\). We write \[ \phi([value],[value],\lambda) = f([value],[value])+\lambda\, g([value],[value]) = [value]+ \lambda ([value])^{**}\] and then solve \[ \frac{\partial \phi}{\partial[value]} = [value]=0\] \[ \frac{\partial \phi}{\partial[value]} = [value]=0\] \[ \frac{\partial \phi}{\partial [value]} = [value]=0\] This gives us three equations in three unknowns, \( [value],[value],[value]\), which can be solved to get: \[ [value].\] Evaluating \(f\) at each of these points gives respective values as \( \left[[value], [value] \right] \). Hence the minimum value is [value] and the maximum value is [value]. \( ** \) Because we are using the variable \(l\) as part of the Maxima code we replace \( \lambda \) with \(l.\)

Improper integrals

So far most of the integrals we have looked at have been of continuous functions \(f(x)\) defined on a closed and bounded interval \([a,b]\). The definite integral is then \[\int_a^b f(x) \mathrm{d}x = F(b)-F(a)\] where \(F(x)\) is any function with \(F'(x)=f(x)\).

An improper integral is where either the function is unbounded, e.g. \(\displaystyle{ \int_0^1 \dfrac1x \mathrm{d}x}\) or the domain of integration is unbounded, e.g. \(\displaystyle{ \int_1^\infty \dfrac1x \mathrm{d}x}\).

In either case the usual approach will not make sense, make sure you see why,

Solving improper integrals

Step 1: Identify where the integrand is unbounded or where the limit(s) of integration is unbounded.

Note that there may be several points such as in \(\displaystyle{ \int_1^\infty \dfrac{2x}{(x^2-4)} \mathrm{d}x}\), in this example the integrand is unbounded with a vertical asymptote at \(2\), and one of the limits of integration is infinity. Note that the though the integrand has another asymptote at \(-2\) this is not a problem as it falls outside the limits of integration.

Step 2: Split the integral into a sum of several pieces so that each piece has at most one improper point.

Using our example we could have

\[\int_1^\infty \dfrac{2x}{(x^2-4)} \mathrm{d}x = \int_1^2 \dfrac{2x}{(x^2-4)} \mathrm{d}x + \int_2^3 \dfrac{2x}{(x^2-4)} \mathrm{d}x+\int_3^\infty \dfrac{1}{(x^2-4)} \mathrm{d}x.\]

The choice of \(3\) here was arbitrary, any value greater than \(2\) would be appropriate.

Step 3: Consider each improper integral (with a single unbounded point) separately. There are two types.

If the integrand is unbounded, such as in \(\displaystyle{\int_1^2 \dfrac{2x}{(x^2-4)} \mathrm{d}x}\), we integrate over a smaller region and take a limit, i.e.

\[\displaystyle{\int_1^2 \dfrac{2x}{(x^2-4)} \mathrm{d}x}= \lim_{t \rightarrow 2-} \displaystyle{\int_1^t \dfrac{2x}{(x^2-4)} \mathrm{d}x}
.\]
In this example we are the taking the limit as \(t\) approaches \(2\) from below. On this region the integral is well defined so we have
\[\lim_{t \rightarrow 2-} \displaystyle{\int_1^t \dfrac{2x}{(x^2-4)} \mathrm{d}x} = \lim_{t \rightarrow 2-} \left( \ln|t^2-4|-\ln|-4|\right)\]
which diverges, in this example.

If the domain of integration is unbounded, such as in \(\displaystyle{\int_3^\infty \dfrac{2x}{(x^2-4)} \mathrm{d}x}\), we integrate over a smaller region and take a limit, i.e.

\[\displaystyle{\int_3^\infty \dfrac{2x}{(x^2-4)} \mathrm{d}x}= \lim_{t \rightarrow \infty} \displaystyle{\int_3^t \dfrac{2x}{(x^2-4)} \mathrm{d}x}
.\]
On this region the integral is well defined so we have
\[\lim_{t \rightarrow \infty} \displaystyle{\int_3^t \dfrac{2x}{(x^2-4)} \mathrm{d}x} = \lim_{t \rightarrow 2-} \left( \ln|t^2-4|-\ln|9-4|\right)\]
which diverges again, in this example.

Step 4: If any of the of the integrals with one unbounded point diverge then we say the original integral  diverges. Otherwise the integral converges only if all of the integrals with one unbounded point converges.

Example

For example, the integral \( \displaystyle{ \int_1^\infty \frac{1}{x^2} \mathrm{d}x\) is improper as the upper limit is infinity. This is the only unbounded point as \(0\) is not within the region of integration. To determine if this integral converges we consider the limit

\[ \lim_{t \rightarrow \infty} \int_1^t \frac{1}{x^2} \mathrm{d}x = \lim_{t \rightarrow \infty} \left(\frac{1}{-t}- \frac{1}{-1}\right)=0+\frac11=1.\]
Since this converges we say the integral converges, and the value of the integral is \(1\), in this case.

Composition of Functions

Consider the two functions \(g(x)=x^2\), and \(h(x)=3x+5\). The Block diagrams below show the rules for these functions.

[Image: composite functions]

Block diagrams of two functions \(g\) and \(h\)

Suppose we place these Block diagrams together in series as shown below, so that the output from function \(g\) is used as the input to function \(h\).

[Image: composite functions 2]

The composition of the two functions to give \(h(g(x))\)

Study the figure above carefully and deduce that when the input to \(g\) is \(x\) the output from the two functions in series is \(3x^2+5\). Since the output from \(g\) is used as input to \(h\) we write

\(h(g(x)) = h(x^2) = 3x^2+5\).

The form \(h(g(x))\) is known as the composition of the functions \(g\) and \(h\).

Suppose we interchange the two functions so that \(h\) is applied first as shown below.

[Image: composite functions 3]

The composition of the two functions to give \(g(h(x))\)

Study the figure above and note that when the input to \(h\) is \(x\) the final output is \((3x+5)^2\). We write

\(g(h(x)) = (3x+5)^2\)

Note that the function \(h(g(x))\) is different from \(g(h(x))\).

Example

Given two functions \(g(t)=3t+2\) and \(h(t)=t+3\) obtain an expression for the composition \(g(h(t))\).

Solution

We have \(g(h(t))= g(t+3)\). Now the rule for \(g\) is ‘triple the input and add \(2\)’, and so we can write \(g(t+3) = 3(t+3) +2= 3t+11\) so, \(g(h(t))= 3t+11\).