From a Derivative to an Initial-Value Problem
An initial-value problem specifies a derivative and the value of the unknown function at one point. For example, it may ask for a function \(y\) satisfying \(y'(x)=g(x)\) together with \(y(a)=b\). The derivative condition describes how the function changes; the initial value fixes which of the possible antiderivatives is required.
When \(g\) combines basic polynomial, exponential, reciprocal, and trigonometric terms, we can find an antiderivative term by term. We then determine its constant using the initial value. The final step is to check both conditions: differentiating the result must recover \(g\), and evaluating it at \(a\) must give \(b\).
The Basic Antiderivatives Used Here
The earlier material on basic antiderivatives establishes the formulas needed for these problems. The following list gathers them in one place. Each formula is understood on an interval where its expressions are defined.
Here, writing \(\int g(x)\,dx\) indicates that we are seeking an antiderivative of \(g\), plus an arbitrary constant. In an initial-value problem, that constant will not remain arbitrary: the initial condition determines it. In particular, a reciprocal term \(k/x\) in the derivative contributes \(k\ln|x|\) to an antiderivative. Because this expression is undefined at \(x=0\), the interval for the problem must not include zero.
A Reliable Solution Process
Check where every term is defined. For a reciprocal term, work on an interval that does not contain zero and that contains the initial point.
Apply the appropriate basic formula to each term, keeping its coefficient and any factor from the inner expression.
Substitute \(x=a\) into the antiderivative and solve for its constant so the result equals \(b\).
Differentiate the proposed function and substitute the initial point into it. Both checks are necessary.
This method uses only basic antiderivatives and the initial condition. It does not require evaluating a definite integral. A logarithm in the answer comes from integrating a reciprocal term, not from integrating a logarithmic term such as \(\ln x\); that is a different integration problem.
Worked Examples
Worked Example: A Mixed Derivative on a Positive Interval
Solve the initial-value problem $$ y'(x)=3x^2+2e^x-\frac{4}{x}+5\cos x-2\sin x,\qquad y(1)=4+2e+5\sin 1+2\cos 1, $$ on \(x>0\).
Since the derivative contains \(1/x\), its domain excludes zero. The initial point \(1\) lies in the positive interval, so we work on \(x>0\). Integrate each term:
Thus a general antiderivative is $$ y(x)=x^3+2e^x-4\ln x+5\sin x+2\cos x+C. $$ Apply \(y(1)=4+2e+5\sin 1+2\cos 1\). Since \(1^3=1\) and \(\ln 1=0\), $$ 1+2e+5\sin 1+2\cos 1+C=4+2e+5\sin 1+2\cos 1, $$ so \(C=3\). The solution is $$ y(x)=x^3+2e^x-4\ln x+5\sin x+2\cos x+3. $$
Differentiate to check the differential equation: $$ y'(x)=3x^2+2e^x-\frac{4}{x}+5\cos x-2\sin x. $$ At the initial point, $$ y(1)=1+2e+0+5\sin 1+2\cos 1+3 =4+2e+5\sin 1+2\cos 1. $$ Both conditions hold.
Worked Example: A Reciprocal Term on a Negative Interval
Solve $$ y'(x)=6x^2-3e^{-x}+\frac{2}{x}+4\sin x,\qquad y(-1)=3e-4\cos 1+5, $$ on \(x<0\).
The reciprocal term excludes zero, and the initial point \(-1\) lies on the negative side. Integrating term by term gives $$ \begin{aligned} \int 6x^2\,dx &= 2x^3,\\ \int -3e^{-x}\,dx &= 3e^{-x},\\ \int \frac{2}{x}\,dx &= 2\ln|x|,\\ \int 4\sin x\,dx &= -4\cos x. \end{aligned} $$ Therefore $$ y(x)=2x^3+3e^{-x}+2\ln|x|-4\cos x+C. $$ At \(x=-1\), the terms are \(2(-1)^3=-2\), \(3e^{-(-1)}=3e\), \(2\ln|-1|=0\), and \(-4\cos(-1)=-4\cos 1\). Substituting the initial value gives $$ -2+3e-4\cos 1+C=3e-4\cos 1+5, $$ so \(C=7\). Hence $$ y(x)=2x^3+3e^{-x}+2\ln|x|-4\cos x+7. $$
Differentiate to check: $$ y'(x)=6x^2-3e^{-x}+\frac{2}{x}+4\sin x. $$ The initial value check is $$ y(-1)=-2+3e+0-4\cos 1+7=3e-4\cos 1+5. $$ The formula satisfies both conditions throughout the negative interval.
Worked Example: Accounting for a Trigonometric Chain Factor
Solve $$ y'(x)=4x^3+\frac{3}{2}e^{2x}+\frac{5}{x}+6\sin(2x),\qquad y\left(\frac{\pi}{2}\right)= \frac{\pi^4}{16}+\frac{3}{4}e^\pi+5\ln\left(\frac{\pi}{2}\right)+7, $$ on \(x>0\).
For the exponential term, differentiating \(e^{2x}\) produces a factor of \(2\), so its antiderivative must account for that factor. For the sine term, an antiderivative of \(\sin(2x)\) is \(-\frac12\cos(2x)\). Thus $$ \begin{aligned} \int 4x^3\,dx &= x^4,\\ \int \frac{3}{2}e^{2x}\,dx &= \frac{3}{4}e^{2x},\\ \int \frac{5}{x}\,dx &= 5\ln x \qquad (x>0),\\ \int 6\sin(2x)\,dx &= -3\cos(2x). \end{aligned} $$ The general antiderivative is $$ y(x)=x^4+\frac{3}{4}e^{2x}+5\ln x-3\cos(2x)+C. $$ At \(x=\pi/2\), the first three terms are \(\pi^4/16\), \(3e^\pi/4\), and \(5\ln(\pi/2)\). Also, \(-3\cos(\pi) = 3\). Therefore the initial condition gives $$ \frac{\pi^4}{16}+\frac{3}{4}e^\pi+5\ln\left(\frac{\pi}{2}\right)+3+C = \frac{\pi^4}{16}+\frac{3}{4}e^\pi+5\ln\left(\frac{\pi}{2}\right)+7, $$ so \(C=4\). The solution is $$ y(x)=x^4+\frac{3}{4}e^{2x}+5\ln x-3\cos(2x)+4. $$
Differentiate, including the inner factor \(2\) in the exponential and trigonometric terms: $$ y'(x)=4x^3+\frac{3}{2}e^{2x}+\frac{5}{x}+6\sin(2x). $$ At \(x=\pi/2\), the value is $$ \frac{\pi^4}{16}+\frac{3}{4}e^\pi+5\ln\left(\frac{\pi}{2}\right)+3+4, $$ which equals the specified initial value. Both checks succeed.
Why the Initial Value Selects One Solution
The term-by-term antiderivative gives a function whose derivative is the prescribed right-hand side, but adding any constant leaves that derivative unchanged. The initial value selects the needed constant. We can also show that no second solution on the same interval can satisfy both conditions.
To verify existence, differentiate the proposed function: \(y'(x)=G'(x)=g(x)\). Evaluating at \(a\) gives \(y(a)=G(a)+b-G(a)=b\).
For uniqueness, suppose \(y_1\) and \(y_2\) are two solutions. Let \(h(x)=y_1(x)-y_2(x)\). Then \(h'(x)=g(x)-g(x)=0\) on \(I\), and \(h(a)=b-b=0\). For any \(x\in I\), the mean value theorem applied between \(a\) and \(x\) gives a point \(c\) between them such that \(h(x)-h(a)=h'(c)(x-a)=0\). Thus \(h(x)=h(a)=0\), so \(y_1(x)=y_2(x)\). The interval condition matters: a reciprocal term divides the domain into separate intervals, and the initial point determines the solution on the interval containing it.
A Common Coefficient Error
A frequent mistake is to omit the coefficient when integrating a reciprocal term. For example, if \(y'(x)=2/x+3\cos x\), writing \(y(x)=\ln|x|+3\sin x+C\) is incorrect: its derivative is \(1/x+3\cos x\), not \(2/x+3\cos x\).
The correction is to integrate \(2/x\) as \(2\ln|x|\), giving \(y(x)=2\ln|x|+3\sin x+C\). If \(y(1)=2\), then \(2\ln 1+3\sin 1+C=2\), so \(C=2-3\sin 1\). Differentiating this corrected function recovers \(2/x+3\cos x\), and substituting \(x=1\) gives \(2\). Checking the derivative catches the coefficient error; checking the initial value catches an incorrect constant.
Check Your Understanding
For each problem, identify a suitable interval, find the solution, and check both conditions.
- Solve \(y'(x)=2x+e^x\), \(y(0)=1\).
- Solve \(y'(x)=3/x+\cos x\), \(y(1)=0\), on \(x>0\).
- Why must a problem whose derivative contains \(1/x\) use an interval that does not contain zero?
- For \(y'(x)=2e^{2x}\), what factor must appear in an antiderivative of the exponential term, and why?
- Explain why knowing the derivative alone does not determine the required solution, and how the initial value completes the specification.