Finding inflection points and concavity for $f(x)= \arctan(xe^{-x})$ 
Given the function $f(x)= \arctan(xe^{-x})$;

*

*Determine the domain of $f(x)$ and study its sign;

*Study asymptotes, continuity and differentiability

*Study max, min and inflection points, showing any intervals in which the function $f(x)$ is convex



*

*$D(f)=  \mathbb{R} $ and $xe^{-x}>0 \iff x>0$ then $I^{+}=(0, +\infty )$ and $I^{-}=(-\infty,0)$


*There's not vertical asymptotes since $D(f)= \mathbb{R}$, we find horizontal asymptotes:
$\lim_{x\to +\infty} xe^{-x} =0$ $\implies \lim_{x\to+\infty} f(x)=0$
$\lim_{x\to -\infty} xe^{-x} = -\infty $ $\implies \lim_{x\to-\infty} f(x)= - \pi/2$
Consequently, $y=0$ and $y=- \pi/2$ are HO $\implies$ there's not
oblique asymptotes.
$f(x)$ is continuous over all $\mathbb{R}$ since there's not VA.
We find $f'(x)= \frac{e^{x}(1-x)}{e^{2x}+x^2}$
Since $e^{2x}+x^2 \neq 0 \forall x \in \mathbb{R}$ $\implies$ $f(x)$ differentible
$\forall x \in \mathbb{R}$


*We find $f'(x)=0$ and we obtain $(1,f(1))$ as critical point.
We know that $f'(x) > 0$ if $x<1$ and as well $f'(x)<0$ if $x>1$
In particular, $f(x)$ is growing $\forall x \in (-\infty, 1)$ and decreasing $\forall x 
   \in (1, +\infty)$ then $(1,f(1))= max$
In order to determine the inflection points and the intervals where $f(x)$ is convex I've
obtained:
$f''(x)= \frac{xe^{3x}+2x^2e^x-2xe^x-2e^{3x}-x^3e^x}{(e^{2x}+x^2)^2} \neq 0 \forall x\in 
   \mathbb{R} $ $\Rightarrow$ there's not potential inflection points.
I'm confused because how can I determine then the intervals where is convex. I did go over and
over again in my calculations and I found no error. I'm not sure if it's proper to say
that since $f''(x) \neq 0 \forall x\in \mathbb{R}$ then $f''(x)$ never crosses the x-
axis, meaning it is either always positive or always negative. I'm struggling as well
to solve the inequality to find $f''(x)>0$ and $f''(x)<0$ any idea?
 A: 
$\forall x{\in}\mathbb{R}\; f''(x)= \dfrac{xe^{3x}+2x^2e^x-2xe^x-2e^{3x}-x^3e^x}{(e^{2x}+x^2)^2} \neq 0  $ $\Rightarrow$ there's no potential inflection point.
I'm not sure if it's proper to say that since $∀x{∈}\mathbb R\; f''(x)≠0$ then $f''(x)$ is either always positive or always negative

Both deductions are invalid: the second derivative of $\large x^{\frac13}$ is nonzero everywhere yet positive and negative at $-1$ and $1,$ respectively, and $0$ is an inflection point of $\large x^{\frac13}.$

I've indeed solved the equation $f''(x)=0$ and I've obtained as potential inflection points $x=0$ and $x=2.$

Yes, $f''(x)=0$ gives only potential inflection points; for example, $g(x)=$ $\large x^4$ has no inflection point and $g''(0)=0.$
Your expression for $f''(x)$ is correct, and solving $f''(x)=0$ gives $-0.38$ and $2.07.$
Since $f''(x)$ exists everywhere, these are the only possible inflection points of $f.$
Finally, doing a sign test at each of these two points reveals that both are inflection points and that $f$ is convex precisely on $\mathbb R{\setminus}[-0.38,2.07].$
Desmos check.

Addendum

This exercise has been taken of an exam and I've actually been not capable to solve $f''(x)=0$ properly.

This requires a numerical method. My Casio fx-991ES (a basic modern calculator, which I suspect is allowed in your exam) has just—using the Newton-Raphson method—correctly returned both $−0.38$ and $2.07,$ as required (albeit taking a good minute or so).
