The Central Idea

A first-order differential equation may be easy or difficult depending on how its variables and derivatives are arranged.

For example,

\[ \frac{dy}{dx}=xy \]

can be reorganized so that all expressions involving \(y\) are placed with \(dy\), while all expressions involving \(x\) are placed with \(dx\).

By contrast,

\[ y'+2y=x \]

is already arranged as a first-order linear equation.

The central skill is therefore not merely integration. It is classification followed by the method that matches the structure.

Two Major First-Order Forms

A separable equation can be written in the form

\[ \boxed{\frac{dy}{dx}=g(x)h(y)}. \]

A linear first-order equation can be written in the form

\[ \boxed{y'+P(x)y=Q(x)}. \]

Some equations belong to both classes, while others belong to only one.

Recognizing a Separable Equation

Consider

\[ \frac{dy}{dx}=x(1+y^2). \]

The right side is a product of a function of \(x\), namely \(x\), and a function of \(y\), namely \(1+y^2\).

Therefore the equation is separable.

By contrast,

\[ \frac{dy}{dx}=x+y \]

is not separable in this form because the variables occur as a sum rather than as a product that can be separated into an \(x\)-part and a \(y\)-part.

Separation of Variables

Suppose

\[ \frac{dy}{dx}=g(x)h(y). \]

When \(h(y)\neq0\), divide by \(h(y)\):

\[ \frac{1}{h(y)}\frac{dy}{dx}=g(x). \]

We then write the separated form as

\[ \boxed{\frac{1}{h(y)}\,dy=g(x)\,dx}. \]

Now each side contains only one variable, so both sides can be integrated.

Why the Differential Notation Is Useful

The notation

\[ \frac{dy}{dx} \]

behaves suggestively during separation, but the underlying justification is the chain rule and integration.

Starting from

\[ \frac{1}{h(y)}\frac{dy}{dx}=g(x), \]

integrate with respect to \(x\):

\[ \int \frac{1}{h(y)}\frac{dy}{dx}\,dx = \int g(x)\,dx. \]

The substitution \(u=y(x)\) turns the left side into an integral with respect to \(y\).

Thus the familiar differential notation accurately reflects the structure of the calculation.

The Basic Separable Workflow

  1. Write the equation as \(y'=g(x)h(y)\) when possible.
  2. Identify any equilibrium solutions before dividing by a factor involving \(y\).
  3. Move the \(y\)-dependent factor with \(dy\).
  4. Move the \(x\)-dependent factor with \(dx\).
  5. Integrate both sides.
  6. Combine constants of integration into a single constant.
  7. Solve explicitly for \(y\) when practical.
  8. Apply any initial condition.
  9. State the appropriate solution interval.
  10. Differentiate and substitute to verify.

Example: The Simplest Separable Equation

Solve

\[ \frac{dy}{dx}=xy. \]

For nonzero \(y\), separate:

\[ \frac{1}{y}\,dy=x\,dx. \]

Integrate:

\[ \int \frac{1}{y}\,dy = \int x\,dx. \] \[ \ln|y|=\frac{x^2}{2}+C. \]

Exponentiate:

\[ |y|=e^C e^{x^2/2}. \]

Absorb the sign and positive constant into a new arbitrary constant \(A\):

\[ \boxed{y=Ae^{x^2/2}}. \]

The value \(A=0\) also includes the equilibrium solution \(y=0\).

Combining Constants Efficiently

After integration we often obtain one constant from each side:

\[ F(y)+C_1=G(x)+C_2. \]

Rearranging gives

\[ F(y)=G(x)+(C_2-C_1). \]

Since the difference of two arbitrary constants is still an arbitrary constant, write

\[ \boxed{F(y)=G(x)+C}. \]

There is usually no benefit to carrying several unrelated constants through the solution.

Example: A Power of the Dependent Variable

Solve

\[ \frac{dy}{dx}=x y^2. \]

Separate:

\[ y^{-2}\,dy=x\,dx. \]

Integrate:

\[ \int y^{-2}\,dy = \int x\,dx. \] \[ -\frac{1}{y}=\frac{x^2}{2}+C. \]

Solve for \(y\):

\[ y=-\frac{1}{x^2/2+C}. \]

Multiplying numerator and denominator by \(2\) and renaming the constant gives a convenient equivalent form:

\[ \boxed{y=-\frac{2}{x^2+C}}. \]

Do Not Lose Equilibrium Solutions

In the equation

\[ y'=xy^2, \]

separation divides by \(y^2\).

But \(y=0\) makes that division invalid.

Check the original differential equation:

\[ y'=0, \qquad xy^2=0. \]

Therefore,

\[ \boxed{y=0} \]

is also a solution and must be recorded separately if it is not already included in the general family.

Example: A Separable Initial-Value Problem

Solve

\[ \frac{dy}{dx}=xy, \qquad y(0)=3. \]

From the previous calculation,

\[ y=Ae^{x^2/2}. \]

Apply the initial condition:

\[ 3=Ae^0. \]

Thus,

\[ A=3. \]

The particular solution is

\[ \boxed{y=3e^{x^2/2}}. \]

Using the Initial Condition Early

An initial condition may be applied after solving explicitly, or sometimes earlier while the solution is still implicit.

Suppose

\[ \ln|y|=\frac{x^2}{2}+C \]

and \(y(0)=3\).

Substitute immediately:

\[ \ln 3=C. \]

Then

\[ \ln|y|=\frac{x^2}{2}+\ln3. \]

Exponentiating leads to the same result,

\[ y=3e^{x^2/2}. \]

Either approach is valid when the domain and sign information are handled correctly.

Example: An Implicit Separable Solution

Solve

\[ \frac{dy}{dx}=\frac{x}{y}. \]

Separate:

\[ y\,dy=x\,dx. \]

Integrate:

\[ \frac{y^2}{2}=\frac{x^2}{2}+C. \]

Multiply by \(2\):

\[ y^2=x^2+C. \]

The implicit form

\[ \boxed{y^2-x^2=C} \]

may be more useful than splitting the solution into the two explicit branches

\[ y=\pm\sqrt{x^2+C}. \]

Absolute Values in Logarithmic Integrals

The antiderivative

\[ \int \frac{1}{y}\,dy \]

is

\[ \boxed{\ln|y|+C}, \]

not merely \(\ln y+C\).

The absolute value allows the formula to represent both positive and negative nonzero values of \(y\) on an appropriate interval.

Example: Trigonometric Separation

Solve

\[ \frac{dy}{dx}=x\cos y. \]

When \(\cos y\neq0\), separate:

\[ \sec y\,dy=x\,dx. \]

Integrate:

\[ \int \sec y\,dy = \int x\,dx. \] \[ \ln|\sec y+\tan y| = \frac{x^2}{2}+C. \]

This implicit form is a valid solution relation. Solving explicitly for \(y\) is not always the most efficient final step.

Separable Models and Proportional Change

The model

\[ \frac{dP}{dt}=kP \]

is separable:

\[ \frac{1}{P}\,dP=k\,dt. \]

Integrating gives

\[ \ln|P|=kt+C. \]

Exponentiating yields

\[ \boxed{P=Ae^{kt}}. \]

This derivation is the mathematical foundation for exponential growth and decay models, which receive a dedicated lesson later in this section.

Recognizing a Linear First-Order Equation

A linear first-order equation can be written as

\[ \boxed{y'+P(x)y=Q(x)}. \]

The function \(y\) and its derivative \(y'\) appear only to the first power and are not multiplied together.

Examples include

\[ y'+3y=x, \] \[ y'-\frac{2}{x}y=x^2, \]

and

\[ y'+(\sin x)y=e^x. \]

What Makes an Equation Nonlinear?

Each of the following is nonlinear:

\[ y'+y^2=x, \] \[ yy'=x, \] \[ y'+\sin y=x. \]

The first contains \(y^2\), the second multiplies \(y\) and \(y'\), and the third places \(y\) inside a nonlinear function.

Linearity refers to how the unknown function and its derivatives appear, not to whether the graph of the solution is a straight line.

Put the Equation in Standard Linear Form First

The integrating-factor method expects the coefficient of \(y'\) to be \(1\).

Consider

\[ x y'+2y=x^3. \]

Divide by \(x\), assuming \(x\neq0\):

\[ y'+\frac{2}{x}y=x^2. \]

Now we can identify

\[ P(x)=\frac{2}{x} \]

and

\[ Q(x)=x^2. \]

The Integrating Factor

For

\[ y'+P(x)y=Q(x), \]

define the integrating factor

\[ \boxed{\mu(x)=e^{\int P(x)\,dx}}. \]

Multiplying the entire differential equation by \(\mu(x)\) makes the left side become the derivative of a product.

Why the Integrating Factor Works

Multiply

\[ y'+P(x)y=Q(x) \]

by \(\mu(x)\):

\[ \mu y'+\mu P y=\mu Q. \]

We want the left side to equal

\[ \frac{d}{dx}(\mu y). \]

By the product rule,

\[ \frac{d}{dx}(\mu y)=\mu y'+\mu' y. \]

Thus we need

\[ \mu'=P\mu. \]

The function

\[ \mu=e^{\int P(x)\,dx} \]

satisfies exactly this requirement.

The Linear-Equation Workflow

  1. Rewrite the equation as \(y'+P(x)y=Q(x)\).
  2. Identify \(P(x)\) and \(Q(x)\).
  3. Compute \(\mu(x)=e^{\int P(x)\,dx}\).
  4. Multiply every term by \(\mu(x)\).
  5. Recognize the left side as \((\mu y)'\).
  6. Integrate both sides.
  7. Solve for \(y\).
  8. Apply any initial condition.
  9. State the appropriate interval.
  10. Verify in the original equation.

Example: Constant-Coefficient Linear Equation

Solve

\[ y'+2y=e^x. \]

Here,

\[ P(x)=2. \]

Therefore,

\[ \mu(x)=e^{\int2\,dx}=e^{2x}. \]

Multiply every term by \(e^{2x}\):

\[ e^{2x}y'+2e^{2x}y=e^{3x}. \]

The left side is

\[ \frac{d}{dx}(e^{2x}y). \]

Thus,

\[ \frac{d}{dx}(e^{2x}y)=e^{3x}. \]

Integrate:

\[ e^{2x}y=\frac{1}{3}e^{3x}+C. \]

Divide by \(e^{2x}\):

\[ \boxed{y=\frac{1}{3}e^x+Ce^{-2x}}. \]

Checking the Linear Solution

Let

\[ y=\frac{1}{3}e^x+Ce^{-2x}. \]

Differentiate:

\[ y'=\frac{1}{3}e^x-2Ce^{-2x}. \]

Then

\[ y'+2y = \frac{1}{3}e^x-2Ce^{-2x} +\frac{2}{3}e^x+2Ce^{-2x}. \]

The terms containing \(C\) cancel:

\[ y'+2y=e^x. \]

The differential equation is satisfied.

Example: A Linear Initial-Value Problem

Solve

\[ y'+2y=e^x, \qquad y(0)=4. \]

The general solution is

\[ y=\frac{1}{3}e^x+Ce^{-2x}. \]

Apply the initial condition:

\[ 4=\frac{1}{3}+C. \]

Therefore,

\[ C=\frac{11}{3}. \]

The particular solution is

\[ \boxed{ y=\frac{1}{3}e^x+\frac{11}{3}e^{-2x} }. \]

Example: Variable Coefficients

Solve

\[ xy'+y=x^2, \qquad x>0. \]

Divide by \(x\):

\[ y'+\frac{1}{x}y=x. \]

Here,

\[ P(x)=\frac{1}{x}. \]

The integrating factor is

\[ \mu(x)=e^{\int 1/x\,dx}. \]

Since \(x>0\),

\[ \mu(x)=e^{\ln x}=x. \]

Multiply through by \(x\):

\[ xy'+y=x^2. \]

The left side is already

\[ \frac{d}{dx}(xy). \]

Thus,

\[ (xy)'=x^2. \]

Integrate:

\[ xy=\frac{x^3}{3}+C. \]

Divide by \(x\):

\[ \boxed{y=\frac{x^2}{3}+\frac{C}{x}}, \qquad x>0. \]

Intervals Matter in Linear Equations

In the previous example, dividing by \(x\) required

\[ x\neq0. \]

Therefore the standard linear form is valid on intervals that do not cross zero, such as

\[ (0,\infty) \]

or

\[ (-\infty,0). \]

The integrating factor and the final solution should be interpreted on one such interval at a time.

The Constant in the Integrating Factor Is Unnecessary

Suppose

\[ \int P(x)\,dx=G(x)+C_0. \]

Then

\[ e^{G(x)+C_0}=e^{C_0}e^{G(x)}. \]

The factor \(e^{C_0}\) is a nonzero constant multiplier. Multiplying an integrating factor by a nonzero constant does not change its effectiveness.

Therefore we normally write simply

\[ \boxed{\mu(x)=e^{\int P(x)\,dx}} \]

without adding an arbitrary constant inside the exponent.

Example: Integrating Factor with a Polynomial Coefficient

Solve

\[ y'+2xy=2x. \]

Here,

\[ P(x)=2x. \]

Therefore,

\[ \mu(x)=e^{\int2x\,dx}=e^{x^2}. \]

Multiply through:

\[ e^{x^2}y'+2xe^{x^2}y=2xe^{x^2}. \]

Recognize the product derivative:

\[ \frac{d}{dx}(e^{x^2}y)=2xe^{x^2}. \]

Integrate:

\[ e^{x^2}y=e^{x^2}+C. \]

Therefore,

\[ \boxed{y=1+Ce^{-x^2}}. \]

Homogeneous Linear First-Order Equations

A linear equation of the form

\[ y'+P(x)y=0 \]

is called homogeneous in the first-order linear sense.

It is both linear and separable:

\[ y'=-P(x)y. \]

Separating gives

\[ \frac{1}{y}\,dy=-P(x)\,dx. \]

Therefore,

\[ \ln|y|=-\int P(x)\,dx+C. \]

Hence,

\[ \boxed{y=Ce^{-\int P(x)\,dx}}. \]

The Homogeneous Part of a Linear Solution

For the nonhomogeneous equation

\[ y'+P(x)y=Q(x), \]

the general solution is often viewed as

\[ \boxed{y=y_h+y_p}, \]

where \(y_h\) solves the homogeneous equation

\[ y'+P(x)y=0 \]

and \(y_p\) is one particular solution of the full equation.

This viewpoint becomes especially important for second-order equations and systems.

Some Equations Are Both Separable and Linear

Consider

\[ y'=3y. \]

It is separable because

\[ \frac{1}{y}\,dy=3\,dx. \]

It is also linear because it can be written

\[ y'-3y=0. \]

Both methods produce

\[ \boxed{y=Ce^{3x}}. \]

When more than one method applies, choose the method that makes the structure clearest and the computation shortest.

Some Linear Equations Are Not Separable

Consider

\[ y'+y=x. \]

Rewriting gives

\[ y'=x-y. \]

The right side cannot be written as a product \(g(x)h(y)\) in the ordinary separable form.

However, the equation is linear, so an integrating factor applies.

Some Separable Equations Are Not Linear

Consider

\[ y'=xy^2. \]

This equation is separable:

\[ y^{-2}\,dy=x\,dx. \]

But it is not linear because \(y\) appears squared.

Classification prevents us from forcing an equation into an inappropriate method.

A Classification Table

Equation Separable? Linear?
\(y'=xy\) Yes Yes
\(y'=xy^2\) Yes No
\(y'+y=x\) No Yes
\(y'=x+y^2\) No No

The table emphasizes that separability and linearity are different structural properties.

Verification by Differentiation

After obtaining a candidate solution, differentiate it and substitute into the original equation.

For example, suppose

\[ y=1+Ce^{-x^2}. \]

Then

\[ y'=-2xCe^{-x^2}. \]

Evaluate

\[ y'+2xy. \]

We obtain

\[ -2xCe^{-x^2}+2x(1+Ce^{-x^2})=2x. \]

Therefore the solution satisfies

\[ y'+2xy=2x. \]

Initial Conditions Select One Curve

A first-order general solution typically contains one arbitrary constant.

An initial condition such as

\[ y(x_0)=y_0 \]

usually determines that constant and selects one curve from the family.

This reflects a general principle: one first-order differential equation normally requires one independent initial condition to determine a unique member of its solution family when the usual existence and uniqueness conditions hold.

Common Error: Separating a Sum

From

\[ y'=x+y, \]

it is not valid to write

\[ \frac{dy}{y}=\frac{dx}{x}. \]

The right side \(x+y\) is a sum, not a product of an \(x\)-function and a \(y\)-function.

Separation of variables requires genuine multiplicative separation after algebraic rearrangement.

Common Error: Dividing Away a Solution

Suppose

\[ y'=x y(y-2). \]

Dividing by \(y(y-2)\) excludes the cases

\[ y=0 \]

and

\[ y=2. \]

Both should be checked in the original equation before division.

In fact, both are equilibrium solutions.

Common Error: Forgetting Absolute Values

The integral

\[ \int \frac{1}{y}\,dy \]

gives

\[ \ln|y|+C. \]

Omitting the absolute value can incorrectly discard negative solution branches before the arbitrary constant is interpreted.

Common Error: Forgetting to Normalize a Linear Equation

For

\[ 2y'+4y=x, \]

the standard linear form is obtained by dividing by \(2\):

\[ y'+2y=\frac{x}{2}. \]

Therefore the coefficient used in the integrating factor is

\[ P(x)=2, \]

not \(4\).

Common Error: Multiplying Only Part of the Equation

When an integrating factor \(\mu(x)\) is used, it must multiply every term in the equation.

From

\[ y'+P(x)y=Q(x), \]

the correct multiplication is

\[ \mu y'+\mu P y=\mu Q. \]

Multiplying only the left side changes the equation and destroys equivalence.

Common Error: Missing the Product Derivative

After multiplying by the integrating factor, do not integrate the two left-hand terms separately unless necessary.

The entire purpose of the method is to recognize

\[ \mu y'+\mu' y = (\mu y)'. \]

This product derivative is the key structural simplification.

Common Error: Dropping the Constant After Integration

Once

\[ (\mu y)'=\mu Q \]

is integrated, write

\[ \mu y=\int \mu Q\,dx+C. \]

The constant is essential because it represents the homogeneous part of the general solution.

Common Error: Ignoring the Original Equation During Verification

Algebraic transformations can introduce domain restrictions or conceal excluded cases.

The final solution should be checked against the original differential equation, not only against a later rearranged form.

This is especially important when division by variables or functions has occurred.

A Decision Procedure

  1. Can the equation be written as \(y'=g(x)h(y)\)? If yes, separation is available.
  2. Can the equation be written as \(y'+P(x)y=Q(x)\)? If yes, the linear method is available.
  3. If both apply, choose the cleaner method.
  4. If neither applies, look for another class such as exact, Bernoulli, homogeneous-substitution, or numerical treatment.
  5. Before dividing by a function of \(y\), identify possible constant solutions.
  6. After solving, use initial data and verify the result.

Example: Full Separable Workflow

Solve

\[ \frac{dy}{dx}=2xy, \qquad y(0)=5. \]

The equation is separable.

For nonzero \(y\), separate:

\[ \frac{1}{y}\,dy=2x\,dx. \]

Integrate:

\[ \ln|y|=x^2+C. \]

Exponentiate:

\[ y=Ae^{x^2}. \]

Apply \(y(0)=5\):

\[ 5=A. \]

Therefore,

\[ \boxed{y=5e^{x^2}}. \]

Verify:

\[ y'=10xe^{x^2} \]

and

\[ 2xy=2x(5e^{x^2})=10xe^{x^2}. \]

The solution satisfies both the equation and the initial condition.

Example: Full Linear Workflow

Solve

\[ y'-y=x, \qquad y(0)=2. \]

This is linear with

\[ P(x)=-1, \qquad Q(x)=x. \]

The integrating factor is

\[ \mu(x)=e^{\int -1\,dx}=e^{-x}. \]

Multiply through:

\[ e^{-x}y'-e^{-x}y=xe^{-x}. \]

The left side is

\[ (e^{-x}y)'. \]

Therefore,

\[ (e^{-x}y)'=xe^{-x}. \]

Integrate the right side by parts:

\[ \int xe^{-x}\,dx=-(x+1)e^{-x}+C. \]

Thus,

\[ e^{-x}y=-(x+1)e^{-x}+C. \]

Multiply by \(e^x\):

\[ y=-(x+1)+Ce^x. \]

Apply \(y(0)=2\):

\[ 2=-1+C. \]

Therefore,

\[ C=3. \]

The particular solution is

\[ \boxed{y=3e^x-x-1}. \]

Practice 1: Classify

Determine whether the equation is separable, linear, both, or neither:

\[ y'=x y. \]

Practice 2: Classify

Determine whether the equation is separable, linear, both, or neither:

\[ y'+3y=x^2. \]

Practice 3: Classify

Determine whether the equation is separable, linear, both, or neither:

\[ y'=x y^3. \]

Practice 4: Separable Equation

Solve

\[ y'=3xy. \]

Practice 5: Separable Initial-Value Problem

Solve

\[ y'=2xy, \qquad y(0)=4. \]

Practice 6: Do Not Lose the Equilibrium

Solve

\[ y'=x y^2 \]

and identify any solution that could be lost during separation.

Practice 7: Linear Equation

Solve

\[ y'+y=1. \]

Practice 8: Linear Initial-Value Problem

Solve

\[ y'+y=1, \qquad y(0)=3. \]

Practice 9: Standard Form

Rewrite in standard linear form and identify \(P(x)\) and \(Q(x)\):

\[ 2x y'+4y=x^3, \qquad x\neq0. \]

Practice 10: Find the Integrating Factor

Find an integrating factor for

\[ y'+\frac{3}{x}y=x^2, \qquad x>0. \]

Practice 11: Solve a Variable-Coefficient Linear Equation

Solve

\[ y'+\frac{1}{x}y=x, \qquad x>0. \]

Practice 12: Verify

Verify that

\[ y=1+Ce^{-x} \]

solves

\[ y'+y=1. \]

Practice Answers

Practice 1

The equation

\[ y'=xy \]

is separable because the right side is a product of a function of \(x\) and a function of \(y\). It is also linear because it can be written

\[ y'-xy=0. \]

Therefore,

\[ \boxed{\text{both separable and linear}}. \]

Practice 2

The equation

\[ y'+3y=x^2 \]

is already in standard linear form. It is not separable in the ordinary product form.

\[ \boxed{\text{linear only}}. \]

Practice 3

The equation

\[ y'=xy^3 \]

is separable, but \(y^3\) makes it nonlinear.

\[ \boxed{\text{separable only}}. \]

Practice 4

Separate:

\[ \frac{1}{y}\,dy=3x\,dx. \]

Integrate:

\[ \ln|y|=\frac{3}{2}x^2+C. \]

Therefore,

\[ \boxed{y=Ce^{3x^2/2}}. \]

Practice 5

The general solution is

\[ y=Ce^{x^2}. \]

Apply \(y(0)=4\):

\[ 4=C. \]

Thus,

\[ \boxed{y=4e^{x^2}}. \]

Practice 6

For nonzero \(y\), separate:

\[ y^{-2}\,dy=x\,dx. \]

Integrate:

\[ -\frac{1}{y}=\frac{x^2}{2}+C. \]

Therefore a nonzero solution family is

\[ \boxed{y=-\frac{2}{x^2+C}}. \]

Division by \(y^2\) excludes \(y=0\), but direct substitution shows that

\[ \boxed{y=0} \]

is also a solution.

Practice 7

The integrating factor is

\[ \mu=e^x. \]

Multiply through:

\[ e^x y'+e^x y=e^x. \]

Therefore,

\[ (e^x y)'=e^x. \]

Integrate:

\[ e^x y=e^x+C. \]

Thus,

\[ \boxed{y=1+Ce^{-x}}. \]

Practice 8

From Practice 7,

\[ y=1+Ce^{-x}. \]

Apply \(y(0)=3\):

\[ 3=1+C. \]

Hence,

\[ C=2. \]

Therefore,

\[ \boxed{y=1+2e^{-x}}. \]

Practice 9

Divide by \(2x\):

\[ y'+\frac{2}{x}y=\frac{x^2}{2}. \]

Therefore,

\[ \boxed{P(x)=\frac{2}{x}}, \qquad \boxed{Q(x)=\frac{x^2}{2}}. \]

Practice 10

Since

\[ P(x)=\frac{3}{x}, \]

and \(x>0\),

\[ \mu(x) =e^{\int 3/x\,dx} =e^{3\ln x} =x^3. \]

Therefore,

\[ \boxed{\mu(x)=x^3}. \]

Practice 11

The integrating factor is

\[ \mu(x)=e^{\int1/x\,dx}=x, \qquad x>0. \]

Multiply through:

\[ xy'+y=x^2. \]

Therefore,

\[ (xy)'=x^2. \]

Integrate:

\[ xy=\frac{x^3}{3}+C. \]

Thus,

\[ \boxed{y=\frac{x^2}{3}+\frac{C}{x}}, \qquad x>0. \]

Practice 12

Differentiate

\[ y=1+Ce^{-x}: \] \[ y'=-Ce^{-x}. \]

Then

\[ y'+y = -Ce^{-x}+1+Ce^{-x} =1. \]

Therefore,

\[ \boxed{y=1+Ce^{-x}} \]

satisfies the differential equation.

What to Remember

A separable first-order equation can be arranged so each variable appears on its own side:

\[ \boxed{ \frac{dy}{dx}=g(x)h(y) \quad\Longrightarrow\quad \frac{1}{h(y)}\,dy=g(x)\,dx }. \]

Then integrate both sides.

A linear first-order equation has the standard form

\[ \boxed{y'+P(x)y=Q(x)}. \]

Its integrating factor is

\[ \boxed{\mu(x)=e^{\int P(x)\,dx}}. \]

Multiplication by \(\mu\) creates the product derivative

\[ \boxed{(\mu y)'=\mu Q}. \]

Where We Go Next

Separation of variables and integrating factors solve two broad and important classes of first-order differential equations. Another class arises when two differential terms combine as the total differential of an underlying potential function.

The next lesson, Exact Equations, develops the condition

\[ M(x,y)\,dx+N(x,y)\,dy=0 \]

and shows how partial derivatives reveal whether a function \(F(x,y)\) exists with

\[ dF=M\,dx+N\,dy. \]

That method connects first-order differential equations directly to multivariable calculus and potential functions.