2

As the integral of $f(x)=\frac{x^2 + 4 x + 2}{x^2 + 2 x}$ with respect to $x \in {\rm I\!R}$, both my solution sheet as well as Mathematica provide $x+ln(x)+ln(2+x)$ as the solution.

However, using integration via substitution, I ended at $x+ln[x(2+x)]$ and felt afraid to disentangle the logarithm. $f(x)$ is defined over the negative realm of ${\rm I\!R}$, too. Hence, using the solution from by sheet and Mathematica, I could not calculate area under the curve for $x<0$. For $x \in [-2,0]$, I am still screwed, but ... it is something?

Presumably, this is a fatuous question about "what is the solution to an integral", as I picked this randomly from the internet just for fun, having no profound mathematical knowledge whatsoever and in terms of being the antiderivative, both functions "$+~C$" seem to do the job. But how does one tackle this kind of problem?

  • Hint:Try to reduce the fraction. you find 1 plus a fraction. split the fraction into two fractions. Then integrate. quite simple. – sirous Sep 09 '19 at 14:47

2 Answers2

1

$$ \int\frac{x^2+4x+2}{x^2+2x}\,dx= \int\frac{x^2+2x+2x+2}{x^2+2x}\,dx= \int\left(\frac{x^2+2x}{x^2+2x}+\frac{2x+2}{x^2+2x}\right)\,dx=\\ \int\left(1+\frac{2x+2}{x^2+2x}\right)\,dx. $$

Use the substitution $u=x^2+2x$ and remember that $\int\frac{1}{x}\,dx=\ln{|x|}+C$ (take a look at this Khan Academy video if you want to know why we should be using the absolute value sign):

$$ \int\,dx+\int\frac{1}{x^2+2x}\frac{d}{dx}(x^2+2x)\,dx= x+\int\frac{1}{u}\,du=\\ x+\ln{|u|}+C= x+\ln{|x^2+2x|}+C=\\ x+\ln{|x(x+2)|}+C= x+\ln{(|x|\cdot|x+2|)}+C=\\ x+\ln{|x|}+\ln{|x+2|}+C. $$

So, there should be absolute value bars inside the logarithms.

Michael Rybkin
  • 6,646
  • 2
  • 11
  • 26
  • Oh my - I performed this, though forgot to only consider absolute values integrating $\frac{1}{x}$. With this in mind, $ln(|x|\cdot|x+2|)=ln(|x|)+ln(|x+2 |)$. Riddle solved, thank you so much. Now I can rest, it made me nervous and I was afraid to ask. – Sinistrum Sep 09 '19 at 15:17
1

The function $f(x) = \frac {x^2 + 4x + 2} {x^2 + 2x}$ is defined on $\mathbb R \smallsetminus \{ -2, 0 \}$.

The function $$F(x) = x + \ln x + \ln (x + 2) + c \tag 1$$ is indeed an antiderivative of $f$, but it is only defined on an interval $I$ contained in $(0, \infty)$, because you must have $x > 0$ in order for $\ln x$ to be defined. Therefore this expression doesn't represent all the possible antiderivatives of $F$.

On the other hand, the function $$F(x) = x + \ln {\lvert x \rvert} + \ln \lvert {x + 2} \rvert + c \tag {2a}$$ is defined precisely on $\mathbb R \smallsetminus \{ -2, 0 \}$. By the logarithmic property, this is exactly the same as $$F(x) = x + \ln {\lvert x(x + 2) \rvert} + c \tag {2b}$$ but it's not the same as $$F(x) = x + \ln {x (x + 2)} + c \tag 3$$ because this expression is defined only if $x < -2 \lor x > 0$.

Therefore, in order to compute the definite integral $\int_a^b f(x) \, dx$, you can use the expression $(1)$ if $[a, b] \subseteq (0, \infty)$ and you can use the expression $(3)$ if $[a, b] \subseteq (-\infty, -2 ) \cup (0, \infty)$, but the expressions $(2a)$ and $(2b)$ work more generally for any $I \subseteq \mathbb R \smallsetminus \{ -2, 0 \}$.

Luca Bressan
  • 6,845
  • Thank you very much indeed. So, there seems to be a concept of multiple possible antiderivatives of F. As I have written, I do not have the necessary background. I like $(2)$ the best. I was hoping that Mathematica would "elaborate" on the solution it gives a little and not presenting only one. Actually, if it gives only one without an hint about that there exist more functions in the solution set, I would have expected your $(2)$. I was left with the impression, with my $(3)$, I simply was wrong, – Sinistrum Sep 09 '19 at 15:43
  • 1
    Any two antiderivatives of $f$ defined on the same interval $I$ differ only by a constant (this is a consequence of the mean value theorem). But two antiderivatives defined on disjoint intervals might have quite different expressions. The problem arises when the domain of $f$ is not connected. Fortunately, for $f(x) = \frac 1 x$ one can still write all the antiderivatives as $\ln {\lvert x \rvert} + c$, because $\lvert x \rvert$ allows us to take into account both the case in which $I \subseteq (-\infty, 0)$ and the case in which $I \subseteq (0, \infty)$ with a single expression. – Luca Bressan Sep 09 '19 at 16:45
  • @Sinistrum By the way, you might want to upvote an answer if you find it useful (see here). – Luca Bressan Sep 09 '19 at 16:49
  • I cannot yet because of insufficient reputation - just 2 missing, though. Somehow, my question (which was my first I ever asked) got 2 up-votes, which helped a lot. However, I feel really miserable I cannot do more than writing "thank you", but as everyone can see my reputation, I assumed it were quite clear why I do not press the up-vote-button. So, I would like to apologize for that. But there is not much I can do now.

    Thank you for your general explanation, clearing my "multiple antiderivative"-issue!

    – Sinistrum Sep 09 '19 at 17:22