4.1 Mid term exam

  4.1.1 Problems listing
  4.1.2 Problem 1
  4.1.3 Problem 2
  4.1.4 Problem 3
  4.1.5 Problem 4
  4.1.6 Problem 5
  4.1.7 Problem 6
  4.1.8 Problem 7
  4.1.9 Problem 8
  4.1.10 Problem 9
  4.1.11 Problem 10

4.1.1 Problems listing

PDF

PDF (letter size)

PDF (legal size)

4.1.2 Problem 1

Solve the initial value problem\begin {align*} x\frac {dy}{dx}-y & =2x^{2}y\\ y\relax (1) & =1 \end {align*}

Solution

It is a good idea to start by first applying the uniqueness theorem in order to find if we expect the solution to exist and if it unique and the interval \(I\) it is valid on. Writing the ODE as\begin {align*} \frac {dy}{dx} & =\frac {2x^{2}y+y}{x}\\ & =\frac {y\left (2x^{2}+1\right ) }{x}\\ & =f\left (x,y\right ) \end {align*}

The above shows that \(f\left (x,y\right ) \)  is continuous for all \(y\) and \(x\) except at \(x=0\,\). Taking derivative w.r.t. \(y\) gives\[ \frac {\partial f\left (x,y\right ) }{\partial y}=\frac {2x^{2}+1}{x}\] Which is continuous for all \(x\) except at \(x=0\). This shows that  interval \(I\) can not contain \(x=0\). And since the initial condition are at \(x=1\) (to the right side of \(x=0\)), then the interval must contain \(x=1\) and since interval can not cross \(x=0\), then this means \(x\) must be positive and there exists an interval \(I\) that contains \(x=1\) and for \(x>0\) where the solution exists and is unique. Now we know that \(x\) must be positive, we can solve the ODE.

Dividing the given ODE through by \(x\neq 0\) gives\[ \frac {dy}{dx}-\frac {y}{x}=2xy \] Collecting on \(y\) gives\begin {align} \frac {dy}{dx}-\frac {y}{x}-2xy & =0\nonumber \\ \frac {dy}{dx}+y\left (\frac {-1}{x}-2x\right ) & =0\tag {1} \end {align}

This has the form \(y^{\prime }+p\relax (x) y=0\). It is therefore a linear ODE in \(y\). The integrating factor is\begin {equation} I=e^{\int p\relax (x) dx}\tag {2} \end {equation} But \(p\relax (x) =\frac {-1}{x}-2x\) in this case. Hence \begin {align*} \int p\relax (x) dx & =-\int \frac {1}{x}dx-2\int xdx\\ & =-\ln \left \vert x\right \vert -x^{2} \end {align*}

But since \(x>0\), then the above simplifies to\[ \int p\relax (x) dx=-\ln x-x^{2}\] Substituting this in (2) gives\begin {align*} I & =e^{-\ln x-x^{2}}\\ & =e^{-\ln x}e^{-x^{2}}\\ & =\frac {1}{x}e^{-x^{2}} \end {align*}

Multiplying both sides of (1) by this integrating factor gives\begin {align*} \frac {1}{x}e^{-x^{2}}\left (\frac {dy}{dx}+y\left (\frac {-1}{x}-2x\right ) \right ) & =0\\ \left (\frac {dy}{dx}\frac {e^{-x^{2}}}{x}+y\left (-\frac {1}{x}-2x\right ) e^{-x^{2}}\right ) & =0 \end {align*}

But \(\left (\frac {dy}{dx}\frac {e^{-x^{2}}}{x}+y\left (\frac {-1}{x}-2x\right ) e^{-x^{2}}\right ) =\frac {d}{dx}\left (y\frac {e^{-x^{2}}}{x}\right ) \) by the product rule. Hence the above becomes\[ \frac {d}{dx}\left (y\frac {e^{-x^{2}}}{x}\right ) =0 \] Integrating gives\begin {align} y\frac {e^{-x^{2}}}{x} & =C\nonumber \\ y & =Cxe^{x^{2}}\tag {3} \end {align}

The constant of integration \(C\) in the above general soltion is found from the given initial conditions \(y\relax (1) =1\). Substituting initial conditions in (3) gives\begin {align*} 1 & =Ce\\ C & =e^{-1} \end {align*}

Hence (3) becomes\[ y=xe^{-1}e^{x^{2}}\] Therefore the particular solution is \[ y\relax (x) =xe^{x^{2}-1}\qquad x>0 \]

4.1.3 Problem 2

Solve the initial value problem\begin {align*} x^{2}\frac {dy}{dx}+2xy-y^{3} & =0\\ x & >0 \end {align*}

Solution

Since \(x\neq 0\), then dividing the given ODE throughout by \(x^{2}\) gives\begin {align*} \frac {dy}{dx}+\frac {2y}{x}-\frac {1}{x^{2}}y^{3} & =0\\ \frac {dy}{dx} & =-\frac {2}{x}y+\frac {1}{x^{2}}y^{3} \end {align*}

This ODE has the form  \(y^{\prime }=p\relax (x) y+q\relax (x) y^{n}\) where \(n>1\). Therefore it is a Bernoulli ODE. In this case \(p\relax (x) =\frac {-2}{x},q\relax (x) =\frac {1}{x^{2}}\) and \(n=3\). Dividing the above by \(y^{3}\) for \(y\neq 0\) gives\begin {equation} \frac {1}{y^{3}}\frac {dy}{dx}=-\frac {2}{x}y^{-2}+\frac {1}{x^{2}}\tag {1} \end {equation} Let \begin {equation} u\relax (x) =y^{-2}\relax (x) \tag {2} \end {equation} be a new dependent variable. Taking derivative w.r.t \(x\) and applying the chain rule to the above gives\[ \,\frac {du}{dx}=-2y^{-3}\frac {dy}{dx}\] Which means\begin {equation} \frac {dy}{dx}=-\frac {1}{2}y^{3}\frac {du}{dx}\tag {3} \end {equation} Substituting equations (2,3) back into (1) gives a new ODE in \(u\left ( x\right ) \)\begin {align} \frac {1}{y^{3}}\left (-\frac {1}{2}y^{3}\frac {du}{dx}\right ) & =-\frac {2}{x}u+\frac {1}{x^{2}}\nonumber \\ -\frac {1}{2}\frac {du}{dx} & =-\frac {2}{x}u+\frac {1}{x^{2}}\nonumber \\ \frac {du}{dx} & =\frac {4}{x}u-\frac {2}{x^{2}}\nonumber \\ \frac {du}{dx}-\frac {4}{x}u & =-\frac {2}{x^{2}}\tag {4} \end {align}

The above has the form \(u^{\prime }+p\relax (x) u=q\relax (x) \). Therefore it is linear in \(u\). The integrating factor is \[ I=e^{\int p\relax (x) dx}\] But \(p\relax (x) =-\frac {4}{x}\). Hence\begin {align*} I & =e^{\int -\frac {4}{x}dx}\\ & =e^{-4\ln \left \vert x\right \vert } \end {align*}

But \(x>0\), therefore the above simplifies to \begin {align*} I & =e^{-4\ln x}\\ & =\frac {1}{x^{4}} \end {align*}

Multiplying both sides of (4) by the above integrating factor gives\begin {align*} \frac {1}{x^{4}}\left (\frac {du}{dx}-\frac {4}{x}u\right ) & =\frac {1}{x^{4}}\left (-\frac {2}{x^{2}}\right ) \\ \left (\frac {du}{dx}\frac {1}{x^{4}}-\frac {1}{x^{4}}\frac {4}{x}u\right ) & =-\frac {2}{x^{6}} \end {align*}

But \(\left (\frac {du}{dx}\frac {1}{x^{4}}-\frac {1}{x^{4}}\frac {4}{x}u\right ) =\frac {d}{dx}\left (u\frac {1}{x^{4}}\right ) \) by the product rule. The above simplifies to\begin {align*} \frac {d}{dx}\left (u\frac {1}{x^{4}}\right ) & =-\frac {2}{x^{6}}\\ d\left (u\frac {1}{x^{4}}\right ) & =-\frac {2}{x^{6}}dx \end {align*}

Integrating both sides gives\begin {align*} \frac {u}{x^{4}} & =-2\int \frac {1}{x^{6}}dx+C\\ & =-2\int x^{-6}dx+C\\ & =-2\left (\frac {x^{-5}}{-5}\right ) +C\\ & =\frac {2}{5}x^{-5}+C \end {align*}

Hence the solution in \(u\) is \[ u=\frac {2}{5x}+Cx^{4}\] But from (2), \(u=y^{-2}\). Therefore the above becomes\begin {align*} y^{-2} & =\frac {2}{5x}+Cx^{4}\\ & =\frac {2+5Cx^{5}}{5x} \end {align*}

Or\[ y^{2}=\frac {5x}{2+5Cx^{5}}\] We can simplify this more by letting \(5C=C_{0}\) be a new constant. The above becomes\[ y^{2}=\frac {5x}{2+C_{0}x^{5}}\] There are two solutions given by\begin {align*} y_{1}\relax (x) & =\sqrt {\frac {5x}{2+C_{0}x^{5}}}\qquad x>0\\ y_{2}\relax (x) & =-\sqrt {\frac {5x}{2+C_{0}x^{5}}}\qquad x>0 \end {align*}

4.1.4 Problem 3

Verify that the given differential equation is exact, then solve it.\[ \left (x^{3}+\frac {y}{x}\right ) dx+\left (y^{2}+\ln x\right ) dy=0 \] Solution

The ODE has the form \begin {equation} M\left (x,y\right ) dx+N\left (x,y\right ) dy=0\tag {1} \end {equation} This is exact if \[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\] Comparing (1) with the given ODE shows that\begin {align*} M\left (x,y\right ) & =x^{3}+\frac {y}{x}\\ N\left (x,y\right ) & =y^{2}+\ln x \end {align*}

Hence \[ \frac {\partial M}{\partial y}=\frac {1}{x}\] And\[ \frac {\partial N}{\partial x}=\frac {1}{x}\] Therefore it is exact since \(\frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\).

Let \(\phi \left (x,y\right ) \) be some constant function, which means \(d\left (\phi \left (x,y\right ) \right ) =0\) or by the chain rule\begin {equation} \frac {\partial \phi }{\partial x}dx+\frac {\partial \phi }{\partial y}dy=0\tag {2} \end {equation} Comparing (1) and (2) shows that\begin {align} \frac {\partial \phi }{\partial x} & =M\tag {3}\\ \frac {\partial \phi }{\partial y} & =N\tag {4} \end {align}

Therefore, if we can find such a function \(\phi \left (x,y\right ) \), then the solution to the ODE becomes \(\phi \left (x,y\right ) =C_{1}\), where \(C_{1}\) is some constant. \(\ \phi \left (x,y\right ) =C_{1}\) is a solution since it satisfies the given ODE (1). To find \(\phi \left (x,y\right ) \) we start with Eq. (3). (we could also start with Eq. (4) and same result will show up). Substituting \(M=x^{3}+\frac {y}{x}\) in (3) gives\[ \frac {\partial \phi }{\partial x}=x^{3}+\frac {y}{x}\] Integrating both sides w.r.t. \(x\) gives\begin {align} \int \frac {\partial \phi }{\partial x}dx & =\int x^{3}+\frac {y}{x}dx\nonumber \\ \phi & =\frac {x^{4}}{4}+y\ln x+f\relax (y) \tag {5} \end {align}

Where in the above \(f\relax (y) \) acts as the constant of integration but now it is a function of \(y\) only since \(\phi \) is function of both \(x,y\) and the integration was done w.r.t. \(x\). Taking derivative of the above w.r.t. \(y\) gives\begin {equation} \frac {\partial \phi }{\partial y}=\ln x+f^{\prime }\relax (y) \tag {6} \end {equation} Comparing (4,6) shows that\[ \ln x+f^{\prime }\relax (y) =N \] But \(N=y^{2}+\ln x\), hence the above becomes\begin {align*} \ln x+f^{\prime }\relax (y) & =y^{2}+\ln x\\ f^{\prime }\relax (y) & =y^{2} \end {align*}

Integrating both sides w.r.t \(y\) gives\begin {align*} \int \frac {df\relax (y) }{dy}dy & =\int y^{2}dy\\ \int df\relax (y) & =\frac {y^{3}}{3}+C\\ f\relax (y) & =\frac {y^{3}}{3}+C \end {align*}

Now that \(f\relax (y) \) is found, substituting it back into Eq. (5) gives\[ \phi =\frac {x^{4}}{4}+y\ln x+\left (\frac {y^{3}}{3}+C\right ) \] But since \(\phi \) is constant, say \(C_{1}\). Then the above gives\[ C_{1}=\frac {x^{4}}{4}+y\ln x+\left (\frac {y^{3}}{3}+C\right ) \] Combining the two constants into one and calling the new constant \(C_{0}\) then the above becomes\[ C_{0}=\frac {x^{4}}{4}+y\ln x+\frac {y^{3}}{3}\] The above is the final solution. It is kept in implicit form. \(C_{0}\) is the constant of integration.

4.1.5 Problem 4

   4.1.5.1 Part (a)
   4.1.5.2 Part (b)

a) Solve the initial value problem\begin {align*} \frac {dy}{dx} & =3+x-y\\ y\relax (0) & =1 \end {align*}

b) Apply Euler’s methods to the initial value problem with step size \(h=0.1\) and complete the following table





\(x\) Euler method \(y\) Exact \(y\) Absolute error




\(0.1\)




\(0.2\)




\(0.3\)




\(0.4\)




Solution

4.1.5.1 Part (a)

Writing the ODE as\begin {equation} \frac {dy}{dx}+y=3+x\tag {1} \end {equation} Shows it is linear ODE since it has the form \(y^{\prime }+p\left ( x\right ) y=q\relax (x) \) where \(p\relax (x) =1,q\left ( x\right ) =3+x\). The integrating factor is \(I=e^{\int p\relax (x) dx}=e^{\int dx}=e^{x}\). Multiplying both sides of (1) by this integration factor gives\begin {align*} e^{x}\left (\frac {dy}{dx}+y\right ) & =e^{x}\left (3+x\right ) \\ \left (\frac {dy}{dx}e^{x}+ye^{x}\right ) & =3e^{x}+xe^{x} \end {align*}

But \(\left (\frac {dy}{dx}e^{x}+ye^{x}\right ) =\frac {d}{dx}\left ( ye^{x}\right ) \) by the product rule. Hence the above becomes\begin {align*} \frac {d}{dx}\left (ye^{x}\right ) & =3e^{x}+xe^{x}\\ d\left (ye^{x}\right ) & =\left (3e^{x}+xe^{x}\right ) dx \end {align*}

Integrating both sides gives\begin {equation} ye^{x}=3\int e^{x}dx+\int xe^{x}dx+C\tag {2} \end {equation} The integral \(\int e^{x}dx=e^{x}\). For the second \(\int xe^{x}dx\) we apply integration by parts. \(\int udv=uv-\int vdu\). Let \(u=x,dv=e^{x}\), then \(du=dx\) and \(v=e^{x}\). Hence the second integral becomes\begin {align*} \int xe^{x}dx & =xe^{x}-\int e^{x}dx\\ & =xe^{x}-e^{x}\\ & =e^{x}\left (x-1\right ) \end {align*}

Putting these results back in (2) gives\[ ye^{x}=3e^{x}+e^{x}\left (x-1\right ) +C \] Multiplying both sides by \(e^{-x}\) gives\begin {align} y & =3+x-1+Ce^{-x}\nonumber \\ & =x+2+Ce^{-x}\tag {3} \end {align}

Initial conditions are now used to find \(C\). Since \(y\relax (0) =1\), then the above becomes\begin {align*} 1 & =2+C\\ C & =-1 \end {align*}

Substituting the above back in (3) gives the particular solution as\[ y\relax (x) =x+2-e^{-x}\]

4.1.5.2 Part (b)

Euler method is given by\begin {align*} y_{1} & =y_{0}+hf\left (x_{0},y_{0}\right ) \\ y_{2} & =y_{1}+hf\left (x_{1},y_{1}\right ) \\ & \vdots \\ y_{n+1} & =y_{n}+hf\left (x_{n},y_{n}\right ) \end {align*}

In this problem \(f\left (x,y\right ) =3+x-y\) and \(x_{0}=0\) and \(y_{0}=1\) because initial conditions are \(y\relax (0) =1\). And \(h=0.1\). We found the exact solution in part (a) as \(y_{exact}\relax (x) =x+2-e^{-x}\). Therefore,

\(x=0.1\)\begin {align*} y_{1} & =y_{0}+hf\left (x_{0},y_{0}\right ) \\ & =\relax (1) +\left (0.1\right ) \left (3+x_{0}-y_{0}\right ) \\ & =\relax (1) +\left (0.1\right ) \left (3+0-1\right ) \\ & =1.2 \end {align*}

And exact is \begin {align*} y_{exact}\left (0.1\right ) & =x+2-e^{-x}\\ & =0.1+2-e^{-0.1}\\ & =1.195\,2 \end {align*}

\(x=0.2\)

Now, using \(x_{1}=0.1\) gives\begin {align*} y_{2} & =y_{1}+hf\left (x_{1},y_{1}\right ) \\ & =1.2+\left (0.1\right ) \left (3+x_{1}-y_{1}\right ) \\ & =1.2+\left (0.1\right ) \left (3+0.1-1.2\right ) \\ & =1.39 \end {align*}

And exact is \begin {align*} y_{exact}\left (0.2\right ) & =0.2+2-e^{-0.2}\\ & =1.3813 \end {align*}

\(x=0.3\)

Using using \(x_{2}=x_{1}+h=0.2\) gives\begin {align*} y_{3} & =y_{2}+hf\left (x_{2},y_{2}\right ) \\ & =1.39+\left (0.1\right ) \left (3+x_{2}-y_{2}\right ) \\ & =1.39+\left (0.1\right ) \left (3+0.2-1.39\right ) \\ & =1.571 \end {align*}

And exact is \begin {align*} y_{exact}\left (0.3\right ) & =0.3+2-e^{-0.3}\\ & =1.5592 \end {align*}

\(x=0.4\)

Using \(x_{3}=x_{2}+h=0.3\) gives\begin {align*} y_{4} & =y_{3}+hf\left (x_{3},y_{3}\right ) \\ & =1.571+\left (0.1\right ) \left (3+x_{3}-y_{3}\right ) \\ & =1.571+\left (0.1\right ) \left (3+0.3-1.571\right ) \\ & =1.7439 \end {align*}

And exact is \begin {align*} y_{exact}\left (0.4\right ) & =0.4+2-e^{-0.4}\\ & =1.7297 \end {align*}

The table becomes





\(x\) Euler method \(y\) Exact \(y\) Absolute error




\(0.1\) \(1.2\) \(1.1952\) \(0.0048\)




\(0.2\) \(1.39\) \(1.3813\) \(0.0087\)




\(0.3\) \(1.571\) \(1.5592\) \(0.0118\)




\(0.4\) \(1.7439\) \(1.7297\) \(0.0142\)




The above shows that the absolute error increases as more steps are taken. Reducing \(h\) will reduce the magnitude of the error.

4.1.6 Problem 5

Solve the following system of equations and write the solution in parametric vector form\begin {align*} x_{1}+2x_{2}+x_{3} & =1\\ 2x_{1}-x_{2}+2x_{3} & =2\\ 3x_{1}+x_{2}+3x_{3} & =-8 \end {align*}

Solution

In Matrix form \(Ax=b\) the above becomes\begin {equation} \begin {bmatrix} 1 & 2 & 1\\ 2 & -1 & 2\\ 3 & 1 & 3 \end {bmatrix}\begin {bmatrix} x_{1}\\ x_{2}\\ x_{3}\end {bmatrix} =\begin {bmatrix} 1\\ 2\\ -8 \end {bmatrix} \tag {1} \end {equation} Therefore the augmented matrix is\[\begin {bmatrix} 1 & 2 & 1 & 1\\ 2 & -1 & 2 & 2\\ 3 & 1 & 3 & -8 \end {bmatrix} \] \(R_{2}=R_{2}-2R_{1}\) gives\[\begin {bmatrix} 1 & 2 & 1 & 1\\ 0 & -5 & 0 & 0\\ 3 & 1 & 3 & -8 \end {bmatrix} \] \(R_{3}=R_{3}-3R_{1}\) gives\[\begin {bmatrix} 1 & 2 & 1 & 1\\ 0 & -5 & 0 & 0\\ 0 & -5 & 0 & -11 \end {bmatrix} \] \(R_{3}=R_{3}-R_{2}\) gives\[\begin {bmatrix} 1 & 2 & 1 & 1\\ 0 & -5 & 0 & 0\\ 0 & 0 & 0 & -11 \end {bmatrix} \] \(R_{2}=-\frac {R_{2}}{5}\) gives\[\begin {bmatrix} 1 & 2 & 1 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & -11 \end {bmatrix} \] \(R_{1}=R_{1}-2R_{2}\) gives\[\begin {bmatrix} 1 & 0 & 1 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & -11 \end {bmatrix} \] But from the last row, it says \(0=-11\). Hence there is no solution. Inconsistent system. Unable to find solution in parametric vector form.

4.1.7 Problem 6

   4.1.7.1 Part a
   4.1.7.2 Part b

Given the matrix \(A=\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix} \) a) Find \(A^{-1}\). b) Use \(A^{-1}\) to solve the system of equations \begin {align*} 3x+4y & =7\\ 4x-2y & =5 \end {align*}

Solution

4.1.7.1 Part a

Since this is a \(2\times 2\) system, then if \(A=\begin {bmatrix} a & b\\ c & d \end {bmatrix} \), its inverse is given by \(A^{-1}=\frac {1}{\det \relax (A) }\begin {bmatrix} d & -b\\ -c & a \end {bmatrix} \). For the matrix \(A\), its determinant is \(\left (-6\right ) -\left ( 16\right ) =-22\). Therefore\begin {align*} A^{-1} & =\frac {1}{-22}\begin {bmatrix} -2 & -4\\ -4 & 3 \end {bmatrix} \\ & =\frac {1}{22}\begin {bmatrix} 2 & 4\\ 4 & -3 \end {bmatrix} \\ & =\begin {bmatrix} \frac {1}{11} & \frac {2}{11}\\ \frac {2}{11} & -\frac {3}{22}\end {bmatrix} \end {align*}

4.1.7.2 Part b

The system of equations given can be written in matrix form \(Ax=b\) as\[\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix}\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} 7\\ 5 \end {bmatrix} \] And since \(A\) is non singular as we found in part (a), then premultiplying both sides by \(A^{-1}\) gives\[\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix} ^{-1}\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix}\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix} ^{-1}\begin {bmatrix} 7\\ 5 \end {bmatrix} \] But \(A^{-1}A\) is the identity matrix. The above simplifies to \[\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} 3 & 4\\ 4 & -2 \end {bmatrix} ^{-1}\begin {bmatrix} 7\\ 5 \end {bmatrix} \] Using result of part (a) the above becomes\[\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} \frac {1}{11} & \frac {2}{11}\\ \frac {2}{11} & -\frac {3}{22}\end {bmatrix}\begin {bmatrix} 7\\ 5 \end {bmatrix} \] But \begin {align*} \begin {bmatrix} \frac {1}{11} & \frac {2}{11}\\ \frac {2}{11} & -\frac {3}{22}\end {bmatrix}\begin {bmatrix} 7\\ 5 \end {bmatrix} & =\begin {bmatrix} \frac {1}{11}\relax (7) +\frac {2}{11}\relax (5) \\ \frac {2}{11}\relax (7) -\frac {3}{22}\relax (5) \end {bmatrix} \\ & =\begin {bmatrix} \frac {7}{11}+\frac {10}{11}\\ \frac {14}{11}-\frac {15}{22}\end {bmatrix} \end {align*}

Hence the solution is\[\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} \frac {17}{11}\\ \frac {13}{22}\end {bmatrix} \]

4.1.8 Problem 7

Use the cofactor expansion to evaluate the given determinant along the second row\[\begin {vmatrix} 0 & 2 & -3\\ -2 & 0 & 5\\ 3 & -5 & 0 \end {vmatrix} \] Solution

Using second row then (where below, \(\left (-1\right ) ^{i+j}\) means row \(i\) and column \(j\). This is used to obtain the sign of each cofactor).\begin {align*} \det \relax (A) & =\left (-1\right ) ^{2+1}\left (-2\right ) \begin {vmatrix} 2 & -3\\ -5 & 0 \end {vmatrix} +\left (-1\right ) ^{2+2}\relax (0) \begin {vmatrix} 0 & -3\\ 3 & 0 \end {vmatrix} +\left (-1\right ) ^{2+3}\relax (5) \begin {vmatrix} 0 & 2\\ 3 & -5 \end {vmatrix} \\ & =\left (-1\right ) \left (-2\right ) \begin {vmatrix} 2 & -3\\ -5 & 0 \end {vmatrix} +\left (-1\right ) \relax (5) \begin {vmatrix} 0 & 2\\ 3 & -5 \end {vmatrix} \\ & =2\begin {vmatrix} 2 & -3\\ -5 & 0 \end {vmatrix} -5\begin {vmatrix} 0 & 2\\ 3 & -5 \end {vmatrix} \\ & =2\left (\left (2\times 0\right ) -\left (-3\times -5\right ) \right ) -5\left (\left (0\times -5\right ) -\left (2\times 3\right ) \right ) \\ & =2\left (-15\right ) -5\left (-6\right ) \\ & =-30+30 \end {align*}

Hence \[ \det \relax (A) =0 \]

4.1.9 Problem 8

Let \(H\) be the set of points in the \(xy\) plane given by  \(H=\left \{ \begin {bmatrix} x\\ y \end {bmatrix} :xy\geq 0\right \} \). Show that \(H\) is not a subspace of \(\mathbb {R} ^{2}\)

Solution

The first thing to check if the zero vector is in \(H\). It is, since \(x,y\) are allowed to be zero and that will satisfy \(xy=0\) part. Hence \(\begin {bmatrix} 0\\ 0 \end {bmatrix} \) in \(H\).

Now we need to check if \(H\) is closed under addition. Let \(\vec {v}_{1}=\begin {bmatrix} x_{1}\\ y_{1}\end {bmatrix} \) such that \(x_{1}y_{1}\geq 0\) and \(\vec {v}_{2}=\begin {bmatrix} x_{2}\\ y_{2}\end {bmatrix} \) such that \(x_{2}y_{2}\geq 0\), which means \(v_{1},v_{2}\) are in \(H\). Then\begin {align*} \vec {v}_{1}+\vec {v}_{2} & =\begin {bmatrix} x_{1}\\ y_{1}\end {bmatrix} +\begin {bmatrix} x_{2}\\ y_{2}\end {bmatrix} \\ \vec {v}_{3} & =\begin {bmatrix} x_{1}+x_{2}\\ y_{1}+y_{2}\end {bmatrix} \end {align*}

And therefore \begin {equation} \left (x_{1}+x_{2}\right ) \left (y_{1}+y_{2}\right ) =x_{1}y_{1}+x_{1}y_{2}+x_{2}y_{1}+x_{2}y_{2}\tag {1} \end {equation} We know that \(x_{1}y_{1}\geq 0\) and that \(x_{2}y_{2}\geq 0\) because \(\vec {v}_{1},\vec {v}_{2}\) are in \(H\). But it is possible that \(x_{1}y_{2}\) or \(x_{2}y_{1}\) can be negative leading to an overall result which is negative. All what we need is one example that shows this. Let \(\vec {v}_{1}=\begin {bmatrix} 1\\ 2 \end {bmatrix} \), which satisfies \(xy\geq 0\) and let \(\vec {v}_{2}=\begin {bmatrix} -3\\ -1 \end {bmatrix} \) which satisfies \(xy\geq 0\). Eq. (1) now becomes

\begin {align} \left (x_{1}+x_{2}\right ) \left (y_{1}+y_{2}\right ) & =\left ( 1-3\right ) \left (2-1\right ) \nonumber \\ & =\left (-2\right ) \relax (1) \nonumber \\ & =-2\tag {2} \end {align}

This shows that \(xy<0\) in this case. Therefore not closed under addition. We do not need to check if closed under scalar multiplication since the first test above failed. The above shows that \(H\) is not a subspace of \(\mathbb {R} ^{2}\).

4.1.10 Problem 9

Determine if the set of vectors span \(\mathbb {R} ^{3}\) . Justify our answer\[ \left \{ \left (1,-2,1\right ) ,\left (2,3,1\right ) ,\left (4,-1,2\right ) \right \} \] Solution

The set spans \(\mathbb {R} ^{3}\) if the vectors are linearly independent. One way to find this is to solve \[ c_{1}\vec {v}_{1}+c_{2}\vec {v}_{2}+c_{3}\vec {v}_{3}=\vec {0}\] For \(c_{1},c_{2},c_{3}\) and see if the only solution is \(c_{1}=0,c_{2}=0,c_{3}=0\,\) or not. If it is, then the vectors are linearly independent and therefore span \(\mathbb {R} ^{3}\). The system to solve is \[ c_{1}\begin {bmatrix} 1\\ -2\\ 1 \end {bmatrix} +c_{2}\begin {bmatrix} 2\\ 3\\ 1 \end {bmatrix} +c_{3}\begin {bmatrix} 4\\ -1\\ 2 \end {bmatrix} =\begin {bmatrix} 0\\ 0\\ 0 \end {bmatrix} \] In Matrix \(Ax=b\) form it becomes\begin {equation} \begin {bmatrix} 1 & 2 & 4\\ -2 & 3 & -1\\ 1 & 1 & 2 \end {bmatrix}\begin {bmatrix} c_{1}\\ c_{2}\\ c_{3}\end {bmatrix} =\begin {bmatrix} 0\\ 0\\ 0 \end {bmatrix} \tag {1} \end {equation} The augmented matrix is \[\begin {bmatrix} 1 & 2 & 4 & 0\\ -2 & 3 & -1 & 0\\ 1 & 1 & 2 & 0 \end {bmatrix} \] \(R_{2}=R_{2}+2R_{1}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 7 & 7 & 0\\ 1 & 1 & 2 & 0 \end {bmatrix} \] \(R_{3}=R_{3}-R_{1}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 7 & 7 & 0\\ 0 & -1 & -2 & 0 \end {bmatrix} \] \(R_{2}=\frac {R_{2}}{7}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 1 & 1 & 0\\ 0 & -1 & -2 & 0 \end {bmatrix} \] \(R_{3}=R_{3}+R_{2}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & -1 & 0 \end {bmatrix} \] \(R_{3}=-R_{3}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 1 & 0 \end {bmatrix} \] \(R_{2}=R_{2}-R_{3}\) gives\[\begin {bmatrix} 1 & 2 & 4 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0 \end {bmatrix} \] \(R_{1}=R_{1}-4R_{3}\) gives\[\begin {bmatrix} 1 & 2 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0 \end {bmatrix} \] \(R_{1}=R_{1}-2R_{2}\) gives\[\begin {bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0 \end {bmatrix} \] The above is in RREF. The original system (1) becomes\begin {equation} \begin {bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end {bmatrix}\begin {bmatrix} c_{1}\\ c_{2}\\ c_{3}\end {bmatrix} =\begin {bmatrix} 0\\ 0\\ 0 \end {bmatrix} \tag {2} \end {equation} The above shows that \(c_{3}=0,c_{2}=0,c_{1}=0\). Since this is the only solution, therefore the set of vectors given span \(\mathbb {R} ^{3}\) because they are linearly independent.

4.1.11 Problem 10

Mark each statement TRUE or FALSE

Solution

a

An integrating factor for the differential equation \(\frac {dy}{dx}=x^{2}y\) is \(e^{\int x^{2}dx}\). FALSE.

b

The equation \(Ax=0\) has the nontrivial solution if and only if there are free variables. TRUE.

c

If \(A\) is \(n\times n\) matrix, then \(\det \left (cA\right ) =c\det \relax (A) \), \(c\,\) is constant. FALSE.

d

The solution set of a homogeneous linear system \(Ax=0\) of \(m\) equation and \(n\) unknowns is a subspace of \(\mathbb {R} ^{n}\). FALSE

e

If \(\vec {x}\) is a vector in the first quadrant of \(\mathbb {R} ^{2}\), then any scalar multiple \(k\vec {x}\) of \(\vec {x}\) is still a vector in the first quadrant of \(\mathbb {R} ^{2}\). FALSE