# Integral of an absolute value function, but it's difficult for me to find zero of the function

#### TehPingwin

I've solved some integrals of absolute value functions before and what I used to do was to separate the intervals for $f(x)>0$ and $f(x)<0$ and would then add them together with $\int_a^b \! f(x) \ = \int_a^b \! (-f(x)) \$ for $f(x)<0$ in $(a,b)$.
In this example I can't 'see' those intervals and fail to calculate them. My attempt to bruteforce the issue gave me a value that differs from what Wolframalpha says it should be. I get something around $5$ while the "real" value should be $20,16$.

Another site that I found(click)showed actually the same antiderivative and the correct value of $20,16$ but it doesn't show how exactly they arrived at that number so I'm still at a loss where I'm making my mistakes. Maybe I'm just tired from all the hours I've put in today. Sorry if it's something trivial and I fail to see that.
My end result for $F(x)$ was $\frac{(e^{2x}−9e^x+4x)(2e^{2x}−9e^x+4)}{|2e^{2x}−9e^x+4|}+C$. I don't exactly understand how it is different from $e^{2x}−9e^x+4x$ but I was told that $\int |f(x)| = \frac{f(x)}{|f(x)|} \int f(x)$ and that is one way to get rid of the absolute value if you can't find the right intervals.

As you can probably tell by now I am pretty confused. If you could put me on the right track first I'd like to try to solve it myself and ask again if I fail.

Thank you!

#### romsek

MHF Helper
let $u = e^x \Rightarrow x = \ln(u)$

$2e^{2x} - 9e^x + 4 = 2 u^2 - 9u + 4 = \\ (2u-1)(u-4)\\ \text{zeros at$u=\dfrac 1 2,~4$} \\ \text{so zeros of original function at$x=\ln(1/2),~\ln(4)$}$

Now see if you can finish.

TehPingwin

#### TehPingwin

[...]
Now see if you can finish.
I was dreading it would be something as simple as this substitution. I still didn't see it so maybe not that trivial afterall. Thank you! It was rather easy from then on and my results match.