Derivatives

Find the derivatives with the respect to x

of the following.

Question 1: \(F(x|x\leq0) = 1-e^{- \lambda x}\)

Step 1: \(F(1) - F(e^{- \lambda x})\) (Derivatives of sums is equal to sums of derivatives)

Step 2: \(0 - (F(e^{- \lambda x}))\) (Derivative of a constant is 0)

Step 3: \(- e^{- \lambda x} * F(- \lambda x)\) (Chain rule)

Step 4: \(- e^{- \lambda x} * - \lambda * F(x)\) (Pull out constant \(\lambda\))

Step 5: \(e^{-\lambda x} * \lambda * 1\) (Derivative of constant \(\lambda\) is 1, negatives cancel out)

Final Answer: \(\lambda e^{- \lambda x}\)

Question 2: F(x|b>a) = \(\frac{x-a}{b-a}\)

Step 1: \(\frac{F(x) + F(-a)}{b-a}\) (Derivatives of sums is equal to sums of derivatives)

Step 2: \(\frac{1 + 0}{b-a}\) (Derivative of X is 1, derivative of constant is 0)

Final Answer: \(\frac{1}{b-a}\)

Question 3: \(F(x|a\leq x \leq c \leq b) = \frac{(x-a)^2}{(b-a)(c-a)}\)

Step 1: \(\frac{1}{(b-a)(c-a)} * F[(x-a)^2]\) (Pull out constants)

Step 2: \(\frac{1}{(b-a)(c-a)} * 2(x-a) * F(x-a)\) (Power rule)

Step 3: \(\frac{1}{(b-a)(c-a)} * 2(x-a) * F(x) - F(-a)\) (Sum/difference of derivatives is same as derivative of sums/differences)

Step 4: \(\frac{1}{(b-a)(c-a)} * 2(x-a) * 1 - 0\) (Derivate of constant is 0, x is 1)

Final Answer: \(\frac{2(x-a)}{(b-a)(c-a)}\)

Question 4: \(F(x|a \leq c < x < b) = 1 - \frac{(b-x)^2}{(b-a)(c-a)}\)

Step 1: \(F(1) - \frac{F[(b-x)^2]}{(b-a)(c-a)}\)

Step 2: \(0 - \frac{2(b-x) * F(b-x)}{(b-a)(c-a)}\) (Derivative of a constant is 0, chain rule for exponent)

Step 3: \(- \frac{2(b-x) * F(b) - F(x)}{(b-a)(c-a)}\) (Derivative of sums is same is sum of derivatives)

Step 4: \(- \frac{2(b-x) * 0 - 1}{(b-a)(c-a)}\) (Derivative of a constant is 0, of x is 1)

Final Answer: \(\frac{2(b-x)}{(b-a)(c-a)}\)

Integrals

Question 5: \(\int_0^{10}{3x^3}dx\)

Step 1: \(3\int{x^3}dx\) (Pull out constant)

Step 2: \(3 \frac{x^4}{4} + C\) (Power rule)

Step 3: \(3 \frac{(10)^4}{4} + C = 3/4 * 10000 + C = 7500 + C\) (Upper bound minus lower bound)

Final Answer: 7500

Question 6: \(\int_0^x{x \lambda e^{- \lambda x}}dx\)

Step 1: \(\lambda \int_0^x{x e^{- \lambda x}}dx\) (Pull out constant \(\lambda\))

Step 2: u-substitution:

\(u = -\lambda x\) \(x = -\frac{u}{\lambda}\) \(du/dx = -\lambda\) (Derivative of x is 1) \(dx = -\frac{1}{\lambda}du\)

Step 2a: Replace u and dx with above values, i.e.:

\[\lambda \int{x e^{u}}(-\frac{1}{\lambda})du\]

Simplified as:

\[\lambda \int{\frac{-e^ux}{\lambda}}du\]

Step 2b: Subsitute x for value above (i.e. \(x = \frac{-u}{\lambda})\)

\[\lambda \int{\frac{-e^u\frac{-u}{\lambda}}{\lambda}}du\]

Simplified as:

\[\lambda \int{\frac{e^uu}{\lambda^2}}du\]

Step 2c: Bring out constant \(\frac{1}{\lambda^2}\)

\[\lambda * \frac{1}{\lambda^2} \int{e^uu} du\]

Step 3: Integration by Parts

\[\int{f(x)g'(x)} = f(x)g(x) \int{f'(x)g(x)}\]

Where:

f(x) = u

f’(x) = 1

g’(x) = e^u

g(x) = e^u

Therefore:

\[\int{e^uu} du = u * e^u - \int{1 * e^u} du\]

Step 4: Simplified and integrate common integrals.

\(= u * e^u - \int{e^u} du\)

\(= ue^u - e^u\) (Integral of e^u is e^u)

\(=\frac{\lambda}{\lambda^2} ue^u - e^u\) (Bring in constant from step 2c)

Step 5: Un-substitute u

\(\frac{\lambda}{\lambda^2} ue^u - e^u\) where u = \(-\lambda x\)

\(\frac{1}{\lambda}*(-\lambda x e^{-\lambda x} - e^{-\lambda x})\)

\(-e^{-\lambda x}x - \frac{e^{-\lambda x}}{\lambda}\)

Final Answer:

\[-e^{-\lambda x}x - \frac{e^{-\lambda x}}{\lambda}\]

Question 7: \(\int_0^{.5}{\frac{1}{b-a}}dx\)

Step 1: Integral of a Constant is X

\(\int{\frac{1}{b-a}}dx = \frac{x}{b-a}\)

Step 2: Add Constant

\(\frac{x}{b-a} + C\)

Step 3: Compute definite integral

\(\frac{0.5}{b-a} - \frac{0}{b-a} = \frac{0.5}{b-a}\)

Final Answer:

\[\frac{0.5}{b-a}\]

Question 8: \(\int_0^{x}{x\frac{1}{\Gamma (\alpha)\beta^\alpha}x^{\alpha - 1}e^{- \beta x}}dx\)

Linear Algebra

With the following matrix:

\[\begin{pmatrix}1 & 2 & 3 \\3 & 3 & 1 \\4 & 6 & 8\end{pmatrix}\]

Question 9: Invert it using Gaussian row reduction.

Step 1: Include identity matrix

\[\begin{pmatrix}1 & 2 & 3 & | & 1 & 0 & 0\\3 & 3 & 1 & | & 0 & 1 & 0\\4 & 6 & 8 & | & 0 & 0 & 1\end{pmatrix}\]

Step 2: Swap Row 3 with Row 1

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\3 & 3 & 1 & | & 0 & 1 & 0\\1 & 2 & 3 & | & 1 & 0 & 0\end{pmatrix}\]

Step 3: Subtract (3/4 * Row 1) from Row 2 to cancel out the coefficient at 1,1.

I.e.: [4,6,8,0,0,1] * 3/4 = [3,4.5,6,0,0,0.75]

[3,3,1,0,1,0] - [3,4.5,6,0,0,0.75] = 0, -1.5, -1, 0, 0, -0.75

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\0 & -1.5 & -5 & | & 0 & 1 & -0.75\\1 & 2 & 3 & | & 1 & 0 & 0\end{pmatrix}\]

Step 4: Cancel out 3,1 by subtracting by 1/4 of Row 1.

I.e.: [4,6,8,0,0,1] * 1/4 = [1,1.5,2,0,0,.25]

[1,2,3,1,0,0] - [1,1.5,2,0,0,.25] = 0,0.5,1,1,0,-0.25

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\0 & -1.5 & -5 & | & 0 & 1 & -0.75\\0 & 0.5 & 1 & | & 1 & 0 & -0.25\end{pmatrix}\] Step 5: Cancel out 3,2 by substracting by 1/3 of Row 2.

I.e.: [0, -1.5, -5, 0, 1, -0.75] * 1/3 = [0, -0.5, -5/3, 0, 1/3, -0.25]

[0, 0.5, 1, 1, 0, -0.25] - [0, -0.5, -5/3, 0, 1/3, -0.25] = 0, 0, -2/3, 1, -1/3, -.5

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\0 & -1.5 & -5 & | & 0 & 1 & -0.75\\0 & 0 & -2/3 & | & 1 & -1/3 & -0.5\end{pmatrix}\]

Step 6: Continue reducing to reduced row echelon form.

Step 6a: Multiply Row 3 by constant -3/2.

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\0 & -1.5 & -5 & | & 0 & 1 & -0.75\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\]

Step 6b: Cancel 2,3 by adding (5 * Row 3) to Row 2

\[\begin{pmatrix}4 & 6 & 8 & | & 0 & 0 & 1\\0 & -1.5 & 0 & | & -15/2 & -1.5 & 3\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\]

Step 6c: Cancel 1,3 by subtracting (8 * Row 3) to Row 1

\[\begin{pmatrix}4 & 6 & 0 & | & 12 & 4 & -5\\0 & -1.5 & 0 & | & -15/2 & -1.5 & 3\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\]

Step 6d: Multiply Row 2 by -2/3

\[\begin{pmatrix}4 & 6 & 0 & | & 12 & 4 & -5\\0 & 1 & 0 & | & 5 & 1 & -2\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\] Step 6e: Cancel out 1,2 by substracting (6 * Row 2) from Row 1:

\[\begin{pmatrix}4 & 0 & 0 & | & -18 & -2 & 7\\0 & 1 & 0 & | & 5 & 1 & -2\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\]

Step 6f: Multiply Row 1 by 1/4:

\[\begin{pmatrix}1 & 0 & 0 & | & -4.5 & -0.5 & 1.75\\0 & 1 & 0 & | & 5 & 1 & -2\\0 & 0 & 1 & | & -3/2 & -1/2 & 0.75\end{pmatrix}\]

The matrix on the right is the Inversion matrix.

Final Answer:

\[\begin{pmatrix}-4.5 & -0.5 & 1.75\\5 & 1 & -2\\-3/2 & -1/2 & 0.75\end{pmatrix}\] ###Question 10: Find the determinant.

Determinant for 3x3 matrices is defined as:

\(det \begin{pmatrix}a & b & c \\d & e & f \\h & i & j\end{pmatrix}\) = a \(det \begin{pmatrix}e & f\\h & i\end{pmatrix}\) - b \(det \begin{pmatrix}d & f\\g & i\end{pmatrix}\) + c \(det \begin{pmatrix}d & e\\g & h\end{pmatrix}\)

Where determinant for 2x2 matrices is defined as:

\(det \begin{pmatrix}a & b\\c & d\end{pmatrix}\) = ad - bc

Therefore:

\(det \begin{pmatrix}1 & 2 & 3 \\3 & 3 & 1 \\4 & 6 & 8\end{pmatrix}\) = 1 \(det \begin{pmatrix}3 & 1\\6 & 8\end{pmatrix}\) - 2 \(det \begin{pmatrix}2 & 1\\4 & 8\end{pmatrix}\) + 3 \(det \begin{pmatrix}3 & 3\\4 & 6\end{pmatrix}\)

And therefore:

\(det \begin{pmatrix}1 & 2 & 3 \\3 & 3 & 1 \\4 & 6 & 8\end{pmatrix}\) = 1 * (24 - 6) - 2 * (24 - 4) + 3 * (18 - 12)

An so on:

18 - 40 + 18 = -4

Final Answer: -4

Question 11: Conduct LU decomposition

To create the Upper matrix we will use Guassian elimination until all the entries below the diagonal are zeroes.

To create the lower matrix we will utilize the elimination matrices used during the above process.

Part 1: Guassian Elimination

\[A =\begin{pmatrix}1 & 2 & 3 \\3 & 3 & 1 \\4 & 6 & 8\end{pmatrix}\]

Subtracting multiples of Row 1 from Row 2 and Row 3 will give use subsequent 0s. I.e.:

3 * [1,2,3] = [3,6,9]

[3,3,1] - [3,6,9] = [0,-3,-8] Row 2

4 * [1,2,3] = [4,8,12]

[4,6,8] - [4,8,12] = [0,-2,-4] Row 3

This gives us the following:

\[A_1 =\begin{pmatrix}1 & 2 & 3 \\0 & -3 & -8 \\0 & -2 & -4\end{pmatrix}\]

The elimination matrix used for this is the following (i.e. what matrix can we multiply A by to get us his current iteration):

\[E_1\begin{pmatrix}1 & 0 & 0 \\-3 & 1 & 0\\-4 & 0 & 1\end{pmatrix}\]

Next we move to subtract 2/3 * Row 2 from Row 3, i.e.:

2/3 * [0,-3,-8] = [0,-2,-16/3]

[0,-2,-4] - [0,-2,-16/3] = [0,0,4/3] Row 3

So our latest iteration of A is our Upper Trianglular Matrix:

\[A_2 = U =\begin{pmatrix}1 & 2 & 3 \\0 & -3 & -8 \\0 & 0 & 4/3\end{pmatrix}\]

The Elimination matrix used during this step is as follows:

\[E_2\begin{pmatrix}1 & 0 & 0 \\0 & 1 & 0\\0 & -2/3 & 1\end{pmatrix}\]

The final Lower matrix is the product of the inverses of our elimination matrices, i.e.:

\[L = E_1^{-1} E_2^{-1}\]

Inversions of elementary matrixes are easy to compute, switching the minus signs on any elements below the diagonal:

\[E_1^{-1}\begin{pmatrix}1 & 0 & 0 \\3 & 1 & 0\\4 & 0 & 1\end{pmatrix}\]

\[E_2^{-1}\begin{pmatrix}1 & 0 & 0 \\0 & 1 & 0\\0 & 2/3 & 1\end{pmatrix}\]

Combining these would give us L. With these elementary matrices the matrix multiplication is simple, i.e.:

\[L = \begin{pmatrix}1 & 0 & 0 \\3 & 1 & 0\\4 & 0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 & 0 \\0 & 1 & 0\\0 & 2/3 & 1\end{pmatrix} = \begin{pmatrix}1 & 0 & 0\\3 & 1 & 0\\4 & 2/3 & 1\end{pmatrix}\] ####Final Answer

\[L = \begin{pmatrix}1 & 0 & 0\\3 & 1 & 0\\4 & 2/3 & 1\end{pmatrix}\]

\[U =\begin{pmatrix}1 & 2 & 3 \\0 & -3 & -8 \\0 & 0 & 4/3\end{pmatrix}\]

Question 12: Multiply the matrix by it’s inverse.

The product of a matrix by its inverse will result in the identity matrix. We can see this in the example below.

Our original matrix:

\[A = \begin{pmatrix}1 & 2 & 3 \\3 & 3 & 1 \\4 & 6 & 8\end{pmatrix}\]

Its inverse (we will call it B for the purpose of this exercise):

\[A^{-1} = B =\begin{pmatrix}-4.5 & -0.5 & 1.75\\5 & 1 & -2\\-3/2 & -1/2 & 0.75\end{pmatrix}\] To perform matrix multiplication, we iterate over the individual columns of B.

\[A B = A B_{Col1}, A B_{Col2}, A B_{Col3}\] Bringing in B column values:

\[A B=A\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix}A \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix}A \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\]

Each of the B columns will get matrix multiplied by our Rows of A, i.e.:

\[A_{row1}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix}A_{row1} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix}A_{row1} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\] \[A_{row2}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix}A_{row2} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix}A_{row2} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\] \[A_{row3}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix}A_{row3} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix}A_{row3} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\]

Bringing in the values for A, i.e.:

\[\begin{pmatrix}1\\2\\3 \end{pmatrix}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix},\begin{pmatrix}1\\2\\3\end{pmatrix} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix},\begin{pmatrix}1\\2\\3\end{pmatrix} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\] \[\begin{pmatrix}3\\3\\1\end{pmatrix}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix},\begin{pmatrix}3\\3\\1\end{pmatrix} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix},\begin{pmatrix}3\\3\\1\end{pmatrix} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\] \[\begin{pmatrix}4\\6\\8\end{pmatrix}\begin{pmatrix}-4.5\\5\\-3/2 \end{pmatrix},\begin{pmatrix}4\\6\\8\end{pmatrix} \begin{pmatrix}-0.5\\1\\-.5 \end{pmatrix},\begin{pmatrix}4\\6\\8\end{pmatrix} \begin{pmatrix}1.75\\-2\\0.75 \end{pmatrix}\]

This simplifies to:

\[\begin{pmatrix}-4.5 + 10 - 4.5 = 1 & -0.5 + 2 - 1.5 = 0, 1.75 - 4 + 2.25 = 0\\-13.5 + 15 - 1.5 = 0 & -1.5 + 3 - 0.5 = 1 & 5.25 - 6 + 0.75 = 0\\-18 + 30 - 12 = 0 & -2 + 6 - 4 = 0 & 7 - 12 + 6 = 1\end{pmatrix}\]

I.e., the identity matrix:

\[\begin{pmatrix}1 & 0 & 0\\0 & 1 & 0\\0 & 0 & 1\end{pmatrix}\]