Introduction
Exponential factors can make a differential equation look more complicated than it is. When the factors depend separately on \(x\) and \(y\), separation of variables turns the equation into two integrals. The main care is then algebraic and domain-related: integration constants must be handled correctly, and a logarithm is defined only when its argument is positive.
We will focus on equations whose right-hand side contains exponential functions of the independent and dependent variables. For instance, in \(y'=e^x e^y\), one factor depends only on \(x\), and the other only on \(y\). That structure lets us separate the variables directly.
Separating exponential factors
The exponential function is positive for every real input, so \(e^y\neq 0\). In an equation \(y'=g(x)e^y\), division by \(e^y\) is therefore valid at every point of a real-valued solution. Multiplying by \(e^{-y}\) gives a separated equation.
For \(y'=g(x)e^y\), separation gives \(e^{-y}y'=g(x)\). The left side is the derivative of \(-e^{-y}\), by the chain rule. This observation both explains why the method works and helps prevent a sign error.
Thus, if \(G'(x)=g(x)\) on an interval, then \(-e^{-y}=G(x)+C\) there, where \(C\) is a constant. Equivalently, one can write \(e^{-y}=K-G(x)\), using a possibly different constant \(K\). If we then solve for \(y\), the logarithm imposes an essential restriction.
Derivation for \(y'=e^x e^y\)
For this particular equation, separation and integration can be written out completely. The chain rule identifies the left integral, and the antiderivative of \(e^x\) is \(e^x\). Each step is valid on any interval where \(y\) is a real-valued differentiable solution.
Since \(e^y\) is never zero, multiply the equation by \(e^{-y}\) to obtain \(e^{-y}y'=e^x\).
\(\frac{d}{dx}(-e^{-y})=e^{-y}y'\), so the equation says that this derivative equals \(e^x\).
It follows that \(-e^{-y}=e^x+C\). Renaming the arbitrary constant gives \(e^{-y}=K-e^x\).
Where \(K-e^x>0\), the explicit solution is \(y=-\ln(K-e^x)\).
This is a complete derivation: differentiating the integrated relation recovers the separated equation, and the final logarithm is permitted precisely where its argument is positive. The domain condition can be made more explicit. If \(K\leq 0\), then \(K-e^x<0\) for every real \(x\), so there is no real-valued explicit solution of this form. If \(K>0\), then \(K-e^x>0\) exactly when \(x<\ln K\).
Worked examples
Worked Example: Solve \(y'=e^x e^y\)
Separate and integrate, retaining an arbitrary constant:
Let \(K=-C\). Then \(e^{-y}=K-e^x\), so the explicit family is
For a real solution, \(K\) must be positive and the formula is defined on \(x<\ln K\). To check it, differentiate:
From the formula, \(e^y=e^{-\ln(K-e^x)}=1/(K-e^x)\). Therefore \(e^x e^y=e^x/(K-e^x)=y'\), as required. The check also confirms the sign in the derivative.
Worked Example: Apply \(y(0)=0\) to \(y'=2e^x e^y\)
Multiplying by \(e^{-y}\) gives \(e^{-y}y'=2e^x\). Since the left side is \(\frac{d}{dx}(-e^{-y})\), integration gives
Use \(y(0)=0\). At \(x=0\), \(e^{-y}=1\) and \(e^0=1\), so \(-1=2+C\), giving \(C=-3\). Rearranging and then taking the logarithm gives
The logarithm requires \(3-2e^x>0\). Thus \(e^x<3/2\), or \(x<\ln(3/2)\). This interval contains the initial point \(x=0\), since \(3/2>1\). To check the differential equation, differentiate and evaluate its right-hand side:
The two sides agree, and substituting \(x=0\) into the solution gives \(y(0)=-\ln(1)=0\). Both the equation and the initial condition are satisfied.
Worked Example: Solve \(y'=3e^{3x-y}\) with \(y(0)=0\)
First rewrite the exponential using \(e^{3x-y}=e^{3x}e^{-y}\). Multiplying the equation by \(e^y\) separates it in a convenient form:
By the chain rule, \(\frac{d}{dx}(e^y)=e^y y'\). Integrating both sides therefore gives
At \(x=0\), \(y=0\), so \(1=1+C\), hence \(C=0\). The relation becomes \(e^y=e^{3x}\), and taking logarithms is valid because both sides are positive. It gives \(y=3x\), which is defined for every real \(x\). Check by differentiation and substitution:
Also, \(y(0)=3\cdot 0=0\). Thus \(y=3x\) satisfies both the equation and the initial condition on the whole real line.
Initial conditions and the logarithm’s domain
For the equation \(y'=e^x e^y\), the initial condition \(y(x_0)=y_0\) determines the constant directly. From \(e^{-y}=K-e^x\), substitute \(x=x_0\) and \(y=y_0\) to get \(e^{-y_0}=K-e^{x_0}\). Therefore \(K=e^{-y_0}+e^{x_0}\), and the solution formula becomes
The expression inside the logarithm is positive at \(x=x_0\): its value there is \(e^{-y_0}>0\). More generally, it is positive when \(e^x<e^{-y_0}+e^{x_0}\), or \(x<\ln(e^{-y_0}+e^{x_0})\). The formula must be restricted to an interval on which this condition holds and that includes the initial point. Checking the initial point alone is not enough; the formula is not a real-valued solution at inputs where the logarithm’s argument is nonpositive.
When solving other exponential equations, the expression under the logarithm can have a different form. The same procedure applies: solve the integrated relation for the exponential involving \(y\), take a logarithm only where its argument is positive, and then restrict the solution to an interval where that condition holds.
A common sign mistake
A frequent error is to integrate \(e^{-y}\,dy\) as \(e^{-y}\). That antiderivative is incorrect because the derivative of \(e^{-y}\) with respect to \(y\) is \(-e^{-y}\). For example, the incorrect calculation would give \(e^{-y}=e^x+C\), then \(y=-\ln(e^x+C)\). Differentiating this proposed formula yields
But \(e^x e^y=e^x/(e^x+C)\), which has the opposite sign. The correction is to include the negative sign in the antiderivative:
Then the integrated relation is \(-e^{-y}=e^x+C\), and the resulting formula passes the differentiation check wherever its logarithm is defined. Differentiating a proposed solution is a direct way to catch mistakes in signs, constants, and algebra.
Why the domain check matters
Integration produces a relation, but an explicit real-valued solution also has to be defined. In these examples, isolating \(y\) requires a logarithm, and its argument must be positive. This condition determines where the formula is valid and ensures that the expression agrees with the positive quantity \(e^{-y}\) or \(e^y\) from which it came.
A reliable workflow for exponential factors is:
- Separate the \(x\)-dependent and \(y\)-dependent factors using operations that are valid.
- Integrate, using the chain rule to identify exponential antiderivatives and their signs.
- Apply any initial condition before solving explicitly, if that makes the constant easier to determine.
- Isolate the exponential involving \(y\), then check positivity before taking a real logarithm.
- Differentiate the proposed formula and substitute it into the original equation; check the initial condition as well when one is given.
Check Your Understanding
For each question, pay attention both to the integration and to where the resulting formula is defined.
- Separate and integrate \(y'=e^{2x}e^y\). What inequality must hold before you take the logarithm?
- Solve \(y'=e^x e^y\) with \(y(0)=\ln 2\), and state the interval containing \(0\) on which the formula is real-valued.
- Why is it valid to divide \(y'=g(x)e^y\) by \(e^y\) for real-valued \(y\)?
- Differentiate \(-e^{-y}\) with respect to \(x\), treating \(y\) as a function of \(x\).
- What is the error in claiming that \(\int e^{-y}\,dy=e^{-y}+C\)?