Difference between revisions of "Integrating Factor"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
Line 1: Line 1:
When solving first order linear differential equations of the form <math> y' + p(x)y = g(x) </math>, we can utilize the "integrating factor" <math> \mu (x) = e^{\int p(x)dx}</math>.
+
==The Method of Integrating Factors==
 
+
<p>Let <span class="math-inline"><math>p</math></span> and <span class="math-inline"><math>g</math></span> be functions of <span class="math-inline"><math>t</math></span> and consider the following first order differential equation:</p>
Steps to solving an equation of the form <math> \frac{dy}{dx} + p(x)y = g(x) </math>:
+
<div style="text-align: center;"><math>\begin{align} \quad \frac{dy}{dt} + p(t) y = g(t) \end{align}</math></div>
# Find the integrating factor <math> \mu (x) = e^{\int p(x)dx} </math>, and note that <math> \mu '(x) = p(x)e^{\int p(x)dx} = p(x)\mu (x)</math>,
+
<p>If we multiply the both sides of the equation above by the function <span class="math-inline"><math>\mu (t)</math></span> we get that:</p>
# Multiply both sides of the equation by the integrating factor.
+
<div style="text-align: center;"><math>\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \end{align}</math></div>
# The left side of the equation, <math> y'\mu (x) + p(x)\mu (x)y </math>, can now be rewritten as <math> (\mu (x)y)' </math> since <math> y'\mu (x) + p(x)\mu (x)y = y'\mu (x) + \mu '(x)y </math>. Verify by taking the derivative of <math> \mu (x)y </math> with respect to x with the product rule.
+
<p>If we can guarantee that <span class="math-inline"><math>\mu ' (t) = \mu (t) p(t)</math></span>, then notice that by applying the product rule for differentiation that we get: <span class="math-inline"><math>\frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu ' (t) y</math></span> and substituting <span class="math-inline"><math>\mu ' (t) = \mu (t) y</math></span> and we get that <span class="math-inline"><math>\frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu (t) p(t) y</math></span> which is exactly the lefthand side of the equation above. Thus we get that:</p>
# Now, integrate <math> (\mu (x)y)' = g(x)\mu (x)</math> to get <math> \mu (x)y = \int g(x)\mu (x)dx </math>.
+
<div style="text-align: center;"><math>\begin{align} \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) g(t) \\ \end{align}</math></div>
# Solve for y.
+
<p>The above differential equation can be solved by integrating both sides of the equation with respect to <span class="math-inline"><math>t</math></span> and isolating <span class="math-inline"><math>y</math></span>. The question now arises on how we can find such a function <span class="math-inline"><math>\mu (t)</math></span>.</p>
 
+
<table class="wiki-content-table">
Example problem: <math> y' + \frac{2}{t}y = t - 1 + \frac{1}{t} </math>
+
<tr>
# <math> \mu (x) = e^{\int \frac{2}{t}dt} = e^{2\ln{|t|}} = e^{\ln{|t|^2}} = t^2 </math>
+
<td><strong>Definition:</strong> If <span class="math-inline"><math>\frac{dy}{dt} + p(t) y = g(t)</math></span> is a first order differential equation, then <span class="math-inline"><math>\mu (t)</math></span> is called an <strong>Integrating Factor</strong> if for <span class="math-inline"><math>\mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t)</math></span> we have that <span class="math-inline"><math>\mu ' (t) = \mu (t) p(t)</math></span>.</td>
# <math> t^2y' + 2ty = t^3 - t^2 + t </math>
+
</tr>
# <math> (t^2y)' = t^3 - t^2 + t </math>
+
</table>
# <math> t^2y = \int (t^3 - t^2 + t)dt = \frac{1}{4}t^4 - \frac{1}{3}t^3 + \frac{1}{2}t^2 + C </math>
+
<p>The following proposition will give us a formula for obtaining the integrating factor for differential equations in the form <span class="math-inline"><math>\frac{dy}{dt} + p(t) y = g(t)</math></span>.</p>
# <math> y = \frac{1}{4}t^2 - \frac{1}{3}t + \frac{1}{2} + \frac{C}{t^2} </math>
+
<table class="wiki-content-table">
 
+
<tr>
==Resources==
+
<td><strong>Proposition 1:</strong> If <span class="math-inline"><math>\frac{dy}{dt} + p(t) y = g(t)</math></span> is a differential equation, then an integrating factor <span class="math-inline"><math>\mu (t)</math></span> of this equation is given by the formula <span class="math-inline"><math>\mu (t) = e^{\int p(t) \: dt}</math></span>.</td>
* [https://tutorial.math.lamar.edu/classes/de/linear.aspx Solving Linear Equations], Paul's Online Notes
+
</tr>
 +
</table>
 +
<ul>
 +
<li><strong>Proof:</strong> We want to find <span class="math-inline"><math>\mu (t)</math></span> such that <span class="math-inline"><math>\mu ' (t) = \mu (t) p(t)</math></span>. We can rewrite this equation as as <span class="math-inline"><math>\frac{\mu '(t)}{\mu (t)} = p(t)</math></span> and then:</li>
 +
</ul>
 +
<div style="text-align: center;"><math>\begin{align} \quad \frac{ \mu '(t)}{ \mu (t)} = p(t) \\ \quad \frac{d}{dt} \ln \mid \mu (t) \mid = p(t) \\ \quad \int \frac{d}{dt} \ln \mid \mu (t) \mid \: dt = \int p(t) \: dt \\ \quad \ln \mid \mu (t) \mid = \int p(t) \: dt \\ \quad \mu (t) = \pm e^{\int p(t) \: dt} \end{align}</math></div>
 +
<ul>
 +
<li>Since we only need one integrating factor to solve differential equations in the form <span class="math-inline"><math>\frac{dy}{dt} + p(t) y = g(t)</math></span>, we can more generally note that <span class="math-inline"><math>\mu (t) = e^{\int p(t) \: dt}</math></span> is an integrating factor of this differential equation. <span class="math-inline"><math>\blacksquare</math></span></li>
 +
</ul>
 +
<p><em>Notice that from proposition 1 that integrating factors <span class="math-inline"><math>\mu (t)</math></span> are not unique. In fact, there are infinitely many integrating factors. This can be see when evaluating the indefinite integral in <span class="math-inline"><math>\mu (t) = e^{\int p(t) \: dt}</math></span> which will result in getting <span class="math-inline"><math>\mu (t) = e^{P(t) + C}</math></span> where <span class="math-inline"><math>P</math></span> is any antiderivative if <span class="math-inline"><math>p</math></span> and where <span class="math-inline"><math>C</math></span> is a constant. We will always use the simplest integrating factor in solving differential equations of this type.</em></p>
 +
<p>Let's now look at some examples of applying the method of integrating factors.</p>
 +
===Example 1===
 +
<p><strong>Find all solutions to the differential equation <span class="math-inline"><math>\frac{dy}{dt} + \frac{2y}{t} = \frac{\sin t}{t^2}</math></span>.</strong></p>
 +
<p>We first notice that our differential equation is in the appropriate form <span class="math-inline"><math>\frac{dy}{dt} + p(t) y = g(t)</math></span> where <span class="math-inline"><math>p(t) = \frac{2}{t}</math></span> and <span class="math-inline"><math>g(t) = \frac{\sin t}{t^2}</math></span>. We compute our integrating factor as:</p>
 +
<div style="text-align: center;"><math>\begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int \frac{2}{t} \: dt} = e^{2 \ln (t)} = e^{\ln (t^2)} = t^2 \end{align}</math></div>
 +
<p>Thus we have that for <span class="math-inline"><math>C</math></span> as a constant:</p>
 +
<div style="text-align: center;"><math>\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad t^2 \frac{dy}{dt} + 2t y = \sin t \\ \quad \frac{d}{dt} \left ( t^2 y \right ) = \sin t \\ \quad \int \frac{d}{dt} \left ( t^2 y \right ) \: dt = \int \sin t \: dt \\ \quad t^2 y = -\cos t + C \\ \quad y = \frac{-\cos t}{t^2} + \frac{C}{t^2} \end{align}</math></div>
 +
===Example 2===
 +
<p><strong>Find all solutions to the differential equation <span class="math-inline"><math>\frac{dy}{dt} - \frac{y}{t} + te^{-t} = 0</math></span>.</strong></p>
 +
<p>We first rewrite our differential equation as <span class="math-inline"><math>\frac{dy}{dt} - \frac{y}{t} = - te^{-t}</math></span>. We note that in this form we have <span class="math-inline"><math>p(t) = - \frac{1}{t}</math></span> and <span class="math-inline"><math>g(t) = -t e^{-t}</math></span>. We now find an integrating factor:</p>
 +
<div style="text-align: center;"><math>\begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int -\frac{1}{t} \: dt} = e^{-\ln t} = e^{\ln \left ( \frac{1}{t} \right)} = \frac{1}{t} \end{align}</math></div>
 +
<p>Thus we have that for <span class="math-inline"><math>C</math></span> as a constant:</p>
 +
<div style="text-align: center;"><math>\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad \frac{1}{t} \frac{dy}{dt} - \frac{1}{t^2} y = -e^{-t} \\ \quad \frac{d}{dt} \left ( \frac{y}{t} \right ) = -e^{-t} \\ \quad \int \frac{d}{dt} \left ( \frac{y}{t} \right ) \: dt = -\int e^{-t} \: dt \\ \quad \frac{y}{t} = e^{-t} + C \\ \quad y = te^{-t} + tC \end{align}</math></div>

Revision as of 14:02, 16 November 2021

The Method of Integrating Factors

Let and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g} be functions of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle t} and consider the following first order differential equation:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \frac{dy}{dt} + p(t) y = g(t) \end{align}}

If we multiply the both sides of the equation above by the function Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} we get that:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \end{align}}

If we can guarantee that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu ' (t) = \mu (t) p(t)} , then notice that by applying the product rule for differentiation that we get: Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu ' (t) y} and substituting Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu ' (t) = \mu (t) y} and we get that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu (t) p(t) y} which is exactly the lefthand side of the equation above. Thus we get that:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) g(t) \\ \end{align}}

The above differential equation can be solved by integrating both sides of the equation with respect to Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle t} and isolating Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y} . The question now arises on how we can find such a function Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} .

Definition: If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + p(t) y = g(t)} is a first order differential equation, then Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} is called an Integrating Factor if for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t)} we have that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu ' (t) = \mu (t) p(t)} .

The following proposition will give us a formula for obtaining the integrating factor for differential equations in the form Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + p(t) y = g(t)} .

Proposition 1: If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + p(t) y = g(t)} is a differential equation, then an integrating factor Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} of this equation is given by the formula Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t) = e^{\int p(t) \: dt}} .
  • Proof: We want to find Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} such that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu ' (t) = \mu (t) p(t)} . We can rewrite this equation as as Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{\mu '(t)}{\mu (t)} = p(t)} and then:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \frac{ \mu '(t)}{ \mu (t)} = p(t) \\ \quad \frac{d}{dt} \ln \mid \mu (t) \mid = p(t) \\ \quad \int \frac{d}{dt} \ln \mid \mu (t) \mid \: dt = \int p(t) \: dt \\ \quad \ln \mid \mu (t) \mid = \int p(t) \: dt \\ \quad \mu (t) = \pm e^{\int p(t) \: dt} \end{align}}
  • Since we only need one integrating factor to solve differential equations in the form Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + p(t) y = g(t)} , we can more generally note that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t) = e^{\int p(t) \: dt}} is an integrating factor of this differential equation. Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \blacksquare}

Notice that from proposition 1 that integrating factors Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t)} are not unique. In fact, there are infinitely many integrating factors. This can be see when evaluating the indefinite integral in Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t) = e^{\int p(t) \: dt}} which will result in getting Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu (t) = e^{P(t) + C}} where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P} is any antiderivative if Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p} and where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle C} is a constant. We will always use the simplest integrating factor in solving differential equations of this type.

Let's now look at some examples of applying the method of integrating factors.

Example 1

Find all solutions to the differential equation Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + \frac{2y}{t} = \frac{\sin t}{t^2}} .

We first notice that our differential equation is in the appropriate form Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} + p(t) y = g(t)} where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p(t) = \frac{2}{t}} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g(t) = \frac{\sin t}{t^2}} . We compute our integrating factor as:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int \frac{2}{t} \: dt} = e^{2 \ln (t)} = e^{\ln (t^2)} = t^2 \end{align}}

Thus we have that for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle C} as a constant:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad t^2 \frac{dy}{dt} + 2t y = \sin t \\ \quad \frac{d}{dt} \left ( t^2 y \right ) = \sin t \\ \quad \int \frac{d}{dt} \left ( t^2 y \right ) \: dt = \int \sin t \: dt \\ \quad t^2 y = -\cos t + C \\ \quad y = \frac{-\cos t}{t^2} + \frac{C}{t^2} \end{align}}

Example 2

Find all solutions to the differential equation Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} - \frac{y}{t} + te^{-t} = 0} .

We first rewrite our differential equation as Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dt} - \frac{y}{t} = - te^{-t}} . We note that in this form we have Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p(t) = - \frac{1}{t}} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g(t) = -t e^{-t}} . We now find an integrating factor:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int -\frac{1}{t} \: dt} = e^{-\ln t} = e^{\ln \left ( \frac{1}{t} \right)} = \frac{1}{t} \end{align}}

Thus we have that for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle C} as a constant:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad \frac{1}{t} \frac{dy}{dt} - \frac{1}{t^2} y = -e^{-t} \\ \quad \frac{d}{dt} \left ( \frac{y}{t} \right ) = -e^{-t} \\ \quad \int \frac{d}{dt} \left ( \frac{y}{t} \right ) \: dt = -\int e^{-t} \: dt \\ \quad \frac{y}{t} = e^{-t} + C \\ \quad y = te^{-t} + tC \end{align}}