1

I have $\int \frac{e^{\ln(1+x)}}{1+x} dx$.

Now, if I simplify $e^{\ln(1+x)}$ to $1+x$, I simply obtain

$\int \frac{1+x}{1+x} dx= \int 1dx = x+C$.

If I do not simplify and I apply the rule $\int f'(x)e^{f(x)} dx = e^{f(x)}+C$, I obtain: $\int \frac{1}{1+x}e^{\ln(1+x)} dx = e^{\ln(1+x)}+C= 1+x+C$

Any ideas? Notice that $-1<x<0$, so $\ln(|1+x|) = \ln(1+x)$.

According to my professor's solution, $x+1+C$ is the correct solution.

amWhy
  • 210,739
Ema
  • 19
  • If your results differ by a constant, they are both correct (or both incorrect). In your case, they differ by the constant $C=1$, so you are as right as the professor.. – GReyes Jan 26 '23 at 20:30
  • They're the same answer. This is why the $+C$ is there. – Zoe Allen Jan 26 '23 at 20:31
  • C+1 is constant. An intergral's solution (indefinite integrals) is a family of solutions which only differ by a constant. – amWhy Jan 26 '23 at 20:54

1 Answers1

3

In general, it is sloppy notation to have an indefinite integral equal something. That is, it is not good practice to say

$$\int f(x)dx =F(x) +C$$

for $F(x)$ such that $F'(x)=f(x)$. It is more correct to say that

$$\int f(x)dx=\left\{ F(x)+C: F'(x)=f(x)\text{ and }C\in\mathbb{R}\right\}$$

That is, an indefinite integral defines a set rather than a single object, we just normally disregard the set notation and hide it in the "$+C$" notation. In your case, you seem to be confusing two different objects in this set with the overall set itself. You'll note that this confusion disappears if you work with definite integrals. Indeed, definite integrals correspond to a single object (some real number). For example, if we follow your procedures above but integrate from $0$ to $\frac12$ then we get

$$(x+C)\big|_{x=0}^{x=\frac12}=\left(\frac12+C\right)-(0+C)=\frac12$$

$$(1+x+C)\big|_{x=0}^{x=\frac12}=\left(1+\frac12+C\right)-(1+0+C)=\frac12$$

In both cases, you get the same answer.

QC_QAOA
  • 12,277