\(% Differentiation % https://tex.stackexchange.com/a/60546/ \newcommand{\Diff}{\mathop{}\!\mathrm{d}} \newcommand{\DiffFrac}[2]{\frac{\Diff #1}{\Diff #2}} \newcommand{\DiffOp}[1]{\frac{\Diff}{\Diff #1}} \newcommand{\Ndiff}[1]{\mathop{}\!\mathrm{d}^{#1}} \newcommand{\NdiffFrac}[3]{\frac{\Ndiff{#1} #2}{\Diff {#3}^{#1}}} \newcommand{\NdiffOp}[2]{\frac{\Ndiff{#1}}{\Diff {#2}^{#1}}} % Evaluation \newcommand{\LEvalAt}[2]{\left.#1\right\vert_{#2}} \newcommand{\SqEvalAt}[2]{\left[#1\right]_{#2}} % Epsilon & Phi \renewcommand{\epsilon}{\varepsilon} \renewcommand{\phi}{\varphi} % Sets \newcommand{\NN}{\mathbb{N}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\QQ}{\mathbb{Q}} \newcommand{\RR}{\mathbb{R}} \newcommand{\CC}{\mathbb{C}} \newcommand{\PP}{\mathbb{P}} \renewcommand{\emptyset}{\varnothing} % Probabililty \DeclareMathOperator{\Cov}{Cov} \DeclareMathOperator{\Corr}{Corr} \DeclareMathOperator{\Var}{Var} \DeclareMathOperator{\Expt}{E} \DeclareMathOperator{\Prob}{P} % Distribution \DeclareMathOperator{\Binomial}{B} \DeclareMathOperator{\Poisson}{Po} \DeclareMathOperator{\Normal}{N} \DeclareMathOperator{\Exponential}{Exp} \DeclareMathOperator{\Geometric}{Geo} \DeclareMathOperator{\Uniform}{U} % Complex Numbers \DeclareMathOperator{\im}{Im} \DeclareMathOperator{\re}{Re} % Missing Trigonometric & Hyperbolic functions \DeclareMathOperator{\arccot}{arccot} \DeclareMathOperator{\arcsec}{arcsec} \DeclareMathOperator{\arccsc}{arccsc} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \DeclareMathOperator{\arsinh}{arsinh} \DeclareMathOperator{\arcosh}{arcosh} \DeclareMathOperator{\artanh}{artanh} \DeclareMathOperator{\arcoth}{arcoth} \DeclareMathOperator{\arsech}{arsech} \DeclareMathOperator{\arcsch}{arcsch} % UK Notation \DeclareMathOperator{\cosec}{cosec} \DeclareMathOperator{\arccosec}{arccosec} \DeclareMathOperator{\cosech}{cosech} \DeclareMathOperator{\arcosech}{arcosech} % Paired Delimiters \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \DeclarePairedDelimiter{\ang}{\langle}{\rangle} % Vectors \newcommand{\vect}[1]{\mathbf{#1}} \newcommand{\bvect}[1]{\overrightarrow{#1}} % https://tex.stackexchange.com/a/28213 % \DeclareMathSymbol{\ii}{\mathalpha}{letters}{"10} % \DeclareMathSymbol{\jj}{\mathalpha}{letters}{"11} % \newcommand{\ihat}{\vect{\hat{\ii}}} % \newcommand{\jhat}{\vect{\hat{\jj}}} \newcommand{\ihat}{\textbf{\^{ı}}} \newcommand{\jhat}{\textbf{\^{ȷ}}} \newcommand{\khat}{\vect{\hat{k}}} % Other Functions \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\tr}{tr} % Other Math Symbols \DeclareMathOperator{\modulo}{mod} \newcommand{\divides}{\mid} \newcommand{\notdivides}{\nmid} \newcommand{\LHS}{\text{LHS}} \newcommand{\RHS}{\text{RHS}} \newcommand{\degree}{^{\circ}}\)

2020.3.7 Question 7

  1. By differentiating both sides of the second differential equation, we can see \begin {align*} \NdiffFrac {2}{y}{x} + g'(x) y + g(x) \DiffFrac {y}{x} & = \DiffFrac {u}{x} \\ & = h(x) - f(x) u \\ & = h(x) - f(x) \left (\DiffFrac {y}{x} + g(x) y\right ), \end {align*}

    and hence rearranging gives \[ \NdiffFrac {2}{y}{x} + (f(x) + g(x)) \DiffFrac {y}{x} + (g'(x) + f(x) g(x))y = f(x), \] as desired.

  2. We must have \(g(x) + f(x) = 1 + \frac {4}{x}\), and \(g'(x) + f(x) g(x) = \frac {2}{x} + \frac {2}{x^2}\), with \(h(x) = 4x + 12\).

    Hence, from the first equation, we have \(f(x) = 1 + \frac {4}{x} - g(x)\), and putting this into the second equation gives us \[ g'(x) + \left (1 + \frac {4}{x} - g(x)\right ) g(x) = \frac {2}{x} + \frac {2}{x^2}. \]

    If \(g(x) = k x^n\), then \(g'(x) = kn x^{n - 1}\), and putting this back we have \[ knx^{n - 1} + \left (1 + \frac {4}{x} - kx^n\right ) kx^n = \frac {2}{x} + \frac {2}{x^2}, \] which gives \[ -k^2 x^{2n} + kx^n + k(n + 4)x^{n - 1} = 2x^{-1} + 2x^{-2}. \]

    Therefore, we could simply let \(n = -1\), and \(k = 2\). Verify that \[ \LHS = -4 x^{-2} + 2x^{-1} + 2 \cdot 3 x^{-2} = 2 x^{-1} + 2 x^{-2} = \RHS . \]

    Hence, \(g(x) = \frac {2}{x}\), and \(f(x) = 1 + \frac {2}{x}\).

    The differential equation for \(u\) is \[ \DiffFrac {u}{x} + \left (1 + \frac {2}{x}\right )u = 4x + 12. \]

    The integration factor is \[ I(x) = e^{\int (1 + \frac {2}{x}) \Diff x} = e^{x + 2 \ln x} = x^2 e^x, \] and hence \[ x^2 e^x \DiffFrac {u}{x} + e^x (x^2 + 2x)u = \DiffFrac {x^2 e^x u}{x} = 4x^3 e^x + 12 x^2 e^x. \]

    Notice the right-hand side is the derivative of \(4x^3 e^x\), and hence \[ x^2 e^x u = 4 x^3 e^x + C. \]

    When \(x = 1\), \begin {align*} \LEvalAt {u}{x = 1} & = \LEvalAt {\DiffFrac {y}{x}}{x = 1} + g(1) \LEvalAt {y}{x = 1} \\ & = -3 + 2 \cdot 5 \\ & = 7, \end {align*}

    and hence \[ 7e = 4e + C, \] giving \(C = 3e\).

    Hence, \[ u = 4 x + \frac {3e}{x^2 e^x}. \]

    The differential equation for \(y\) gives \[ \DiffFrac {y}{x} + \frac {2}{x} y = u, \] and hence the integration factor is \(x^2\), giving \[ \DiffFrac {x^2 y}{x} = 4x^3 + 3e \cdot e^{-x}, \] and hence by integration on both sides, we have \[ x^2 y = x^4 - 3e \cdot e^{-x} + C'. \]

    Since when \(x = 1\), \(y = 5\), we must have \[ 5 = 1 - 3 + C', \] giving \(C' = 7\).

    Hence, \[ x^2 y = x^4 - 3e^{1 - x} + 7, \] and hence \[ y = x^2 - 3 x^{-2} e^{1 - x} + 7 x^{-2}. \]