# Understanding linear differential equations and the method of integrating factors

Suppose we have a first-order linear differential equation of the form

$$\frac{dy}{dt}+ay=g(t) \tag 1$$

where $$a$$ is a given constant and $$g(t)$$ is a given function.

Because the coefficient of $$y'$$ is $$1$$, we have $$\mu(t)=e^{\int a dt}=e^{at}$$, which is the integrating factor.

When we multiply the diffeq. $$(1)$$ through by that integrating factor the LHS is the result of a product rule differentiation (i.e. it is the derivative with respect to $$t$$ of the integrating factor times $$y$$); that is,

$$e^{at}[\frac{dy}{dt}+ay]=\frac{d}{dt}[e^{at}y]$$

Thus $$\frac{d}{dt}[e^{at}y]=e^{at}g(t) \Rightarrow \int \frac{d}{dt}[e^{at}y] dt=\int e^{at}g(t)dt \Rightarrow e^{at}y=\int e^{at}g(t)dt$$

But my book says, "integrating both sides of the equation $$\frac{d}{dt} [e^{at}y]=e^{at}g(t)$$,

we find that $$e^{at}y=\int e^{at}g(t)dt+c \tag 2$$

where $$c$$ is an arbitrary constant". I'm not sure I understand this correctly, I know that the derivative and integral on the LHS cancel each other out, but where does the $$c$$ come from if we've not taken the antiderivative of the RHS?

And then the author says, "For many simple functions $$g(t)$$, we can evaluate the integral in equation $$(2)$$ and express the solution $$y$$ in terms of elementary functions. However, for more complicated functions $$g(t)$$, it is necessary to leave the solution in integral form. In this case

$$y=e^{-at}\int_{t_0}^te^{as}g(s)ds+ce^{-at} \tag 3$$

Note that in equation (3) we have used $$s$$ to denote the integration variable to distinguish it from the independent variable $$t$$, and we have chosen some convenient value $$t_0$$ as the lower limit of integration. The choice of $$t_0$$ determines the specific value of the constant $$c$$ but does not change the solution. For example, plugging $$=t_0$$ into the solution formula $$(3)$$ shows that $$c=y(t_0)e^{at_0}$$".

Can someone please explain how to reason through this problem?

• $\int f'(x)dx=f(x)+c$. They do not simply "cancel each other out"! Jan 26, 2022 at 8:46
• $\small \int \frac{d}{dt} [e^{at}y] = e^{at}y +c$ Jan 26, 2022 at 8:47
• I said that functions with same derivatives differ by a constant only to support the fact that "derivate and integral don't cancel out each other" as you happened to ask "why not". But if you want to see the analogy here then consider the functions, $f_1(t)= e^{at}y, \: f_2(t)=\int e^{at}g(t)dt$ and observe that $f_1$ and $f_2$ have same derivatives and so they differ by a constant as the book mentioned in eqn $(2)$. Jan 26, 2022 at 11:22
• You got that $\int \frac{d}{dt}[e^{at}y]dt=e^{at}y+k \Rightarrow ye^{at}=\int e^{at}g(t)dt-k$. Yeah, that's it. The book uses $+c$ instead of $-k$ as the constant of integration, which doesn't matter 'cause both represents arbitrary constant. "And because...." Yeah that's right too, more precisely, $c=-k+c_1$ where $c_1$ is the constant by which functions with same derivatives differ, isn't it? Jan 26, 2022 at 11:39
• @AmanKushwaha Got it :) That makes sense! Jan 26, 2022 at 11:46

Perhaps using (definite) integration, rather than antidifferentiation, will help you understand better. Notice that if $$\frac{\mathrm{d}}{\mathrm{d}t}e^{at}y(t)=e^{at}g(t),$$ then $$\int_{t_0}^t\frac{\mathrm{d}}{\mathrm{d}t'}e^{at'}y(t')\,\mathrm{d}t'=e^{at}y(t)-e^{at_0}y(t_0),$$ hence $$e^{at}y(t)=\int_{t_0}^te^{as}g(s)\,\mathrm{d}s+e^{at_0}y(t_0).$$ Now just let $$c=e^{at_0}y(t_0),$$ and you get the equation derived by the book.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# Understanding linear differential equations and the method of integrating factors

Suppose we have a first-order linear differential equation of the form

$$\frac{dy}{dt}+ay=g(t) \tag 1$$

where $$a$$ is a given constant and $$g(t)$$ is a given function.

Because the coefficient of $$y'$$ is $$1$$, we have $$\mu(t)=e^{\int a dt}=e^{at}$$, which is the integrating factor.

When we multiply the diffeq. $$(1)$$ through by that integrating factor the LHS is the result of a product rule differentiation (i.e. it is the derivative with respect to $$t$$ of the integrating factor times $$y$$); that is,

$$e^{at}[\frac{dy}{dt}+ay]=\frac{d}{dt}[e^{at}y]$$

Thus $$\frac{d}{dt}[e^{at}y]=e^{at}g(t) \Rightarrow \int \frac{d}{dt}[e^{at}y] dt=\int e^{at}g(t)dt \Rightarrow e^{at}y=\int e^{at}g(t)dt$$

But my book says, "integrating both sides of the equation $$\frac{d}{dt} [e^{at}y]=e^{at}g(t)$$,

we find that $$e^{at}y=\int e^{at}g(t)dt+c \tag 2$$

where $$c$$ is an arbitrary constant". I'm not sure I understand this correctly, I know that the derivative and integral on the LHS cancel each other out, but where does the $$c$$ come from if we've not taken the antiderivative of the RHS?

And then the author says, "For many simple functions $$g(t)$$, we can evaluate the integral in equation $$(2)$$ and express the solution $$y$$ in terms of elementary functions. However, for more complicated functions $$g(t)$$, it is necessary to leave the solution in integral form. In this case

$$y=e^{-at}\int_{t_0}^te^{as}g(s)ds+ce^{-at} \tag 3$$

Note that in equation (3) we have used $$s$$ to denote the integration variable to distinguish it from the independent variable $$t$$, and we have chosen some convenient value $$t_0$$ as the lower limit of integration. The choice of $$t_0$$ determines the specific value of the constant $$c$$ but does not change the solution. For example, plugging $$=t_0$$ into the solution formula $$(3)$$ shows that $$c=y(t_0)e^{at_0}$$".

Can someone please explain how to reason through this problem?

• $\int f'(x)dx=f(x)+c$. They do not simply "cancel each other out"! Jan 26, 2022 at 8:46
• $\small \int \frac{d}{dt} [e^{at}y] = e^{at}y +c$ Jan 26, 2022 at 8:47
• I said that functions with same derivatives differ by a constant only to support the fact that "derivate and integral don't cancel out each other" as you happened to ask "why not". But if you want to see the analogy here then consider the functions, $f_1(t)= e^{at}y, \: f_2(t)=\int e^{at}g(t)dt$ and observe that $f_1$ and $f_2$ have same derivatives and so they differ by a constant as the book mentioned in eqn $(2)$. Jan 26, 2022 at 11:22
• You got that $\int \frac{d}{dt}[e^{at}y]dt=e^{at}y+k \Rightarrow ye^{at}=\int e^{at}g(t)dt-k$. Yeah, that's it. The book uses $+c$ instead of $-k$ as the constant of integration, which doesn't matter 'cause both represents arbitrary constant. "And because...." Yeah that's right too, more precisely, $c=-k+c_1$ where $c_1$ is the constant by which functions with same derivatives differ, isn't it? Jan 26, 2022 at 11:39
• @AmanKushwaha Got it :) That makes sense! Jan 26, 2022 at 11:46

Perhaps using (definite) integration, rather than antidifferentiation, will help you understand better. Notice that if $$\frac{\mathrm{d}}{\mathrm{d}t}e^{at}y(t)=e^{at}g(t),$$ then $$\int_{t_0}^t\frac{\mathrm{d}}{\mathrm{d}t'}e^{at'}y(t')\,\mathrm{d}t'=e^{at}y(t)-e^{at_0}y(t_0),$$ hence $$e^{at}y(t)=\int_{t_0}^te^{as}g(s)\,\mathrm{d}s+e^{at_0}y(t_0).$$ Now just let $$c=e^{at_0}y(t_0),$$ and you get the equation derived by the book.
user
The text passage primarily discusses the method of integrating factors for solving first-order linear differential equations and includes a detailed explanation of the steps involved, along with a question from the reader about the appearance of the constant \( c \) in the solution.

TYPE: NO_QUESTION

However, the passage does contain a question from the reader in the comments section, which is not part of the main text. If we consider the comments as part of the text, then the analysis would be:

TYPE: SINGLE_QUESTION

The question in the comments asks for an explanation of why the constant \( c \) appears in the solution when integrating both sides of the equation. The answer provided in the comments explains that the constant \( c \) arises from the indefinite integral, which is necessary to account for the family of solutions to the differential equation.