You are making this harder than it needs to be. You don't need to solve $y =e-x^2e^x$ for $y=0$. You have been given that the x-intercept is 1, so you simply need to verify that statement. In other words, just plug $x=1$ into the equation and verify that it gives $y=0$.
$$y = e-x^2e^x$$
Let $x=1$
$$y = e-1^2e^1$$
$$y = e-e = 0$$
So 1 is the x-intercept.
Here's some more info about this equation for those who are interested.
From the plot of the equation it appears that there's only one x-intercept. We can get some more info about the behaviour of the function by using a little calculus and taking its derivative.
$$\begin{align}
y & = e-x^2e^x\\
y' & = -x^2e^x -2xe^x\\
& = -(x^2 + 2x)e^x\\
y' & = -x(x + 2)e^x\\
\end{align}$$
We get stationary points (minima, maxima, or points of inflexion) when $y'$ is zero. $e^x$ is not zero for finite $x$, so the only solutions for $y'=0$ are $x=0$ or $x=-2$. With some further analysis, it can be shown that there's a minimum at $x=-2$, with $y=e-4e^{-2}$, and a maximum at $x=0$, with $y=e$.
It is actually possible to invert $y =e-x^2e^x$. It's not possible using elementary functions, but it can be done using the Lambert W function (aka the omega function).
This function is defined to be the inverse function of $f(x)=xe^x$. In other words, if $y = xe^x$, then $x = W(y)$. As the Wikipedia article mentions, Lambert W is defined over the complex plane, and it's actually a family of functions because there is generally not a single inverse.
Here's how we use Lambert W to invert the given function.
$$\begin{align}
y & = e - x^2 e^x\\
e - y & = x^2 e^x\\
\sqrt{e - y} & = x e^{\frac{x}{2}}\\
\frac{\sqrt{e - y}}{2} & = \frac{x}{2} e^{\frac{x}{2}}\\
W\left(\frac{\sqrt{e - y}}{2}\right) & = \frac{x}{2}\\
x & = 2 W\left(\frac{\sqrt{e - y}}{2}\right)
\end{align}$$
When using this equation we need to choose which branch of the $W$ that we want, we also need to specify whether we want the positive or negative square root.
Many advanced mathematics libraries provide the Lambert W. Here's a short Python 3 demo using the mpmath library.
from mpmath import mp
# Use 50 decimal digits of precision
mp.dps = 50
# Print with 10 digits of precision
out_prec = 10
def func(x):
return mp.e - x * x * mp.exp(x)
def inv_func(y, sign, k):
return 2 * mp.lambertw(sign * mp.sqrt(mp.e - y) / 2, k=k)
r = mp.mpf('.1')
for i in range(-25, 15):
x = i * r
y = func(x)
# Determine which square root and branch of the Lambert W
# function we need to get back the x we started with
if x < -2:
sign, k = -1, -1
elif -2 <= x < 0:
sign, k = -1, 0
else:
sign, k = 1, 0
xx = inv_func(y, sign, k)
print(x, mp.nstr(y, n=out_prec), mp.nstr(xx, n=out_prec))
output
-2.5 2.205250587 -2.5
-2.4 2.195746418 -2.4
-2.3 2.187912545 -2.3
-2.2 2.181994542 -2.2
-2.1 2.17824898 -2.1
-2.0 2.176940696 -2.0
-1.9 2.178339113 -1.9
-1.8 2.182713431 -1.8
-1.7 2.190326444 -1.7
-1.6 2.201426742 -1.6
-1.5 2.216238968 -1.5
-1.4 2.234951779 -1.4
-1.3 2.257703098 -1.3
-1.2 2.284562163 -1.2
-1.1 2.315507817 -1.1
-1.0 2.350402387 -1.0
-0.9 2.388960404 -0.9
-0.8 2.430711291 -0.8
-0.7 2.47495503 -0.7
-0.6 2.520709639 -0.6
-0.5 2.566649164 -0.5
-0.4 2.611030621 -0.4
-0.3 2.651608189 -0.3
-0.2 2.685532598 -0.2
-0.1 2.709233454 -0.1
0.0 2.718281828 0.0
0.1 2.707230119 0.1
0.2 2.669425718 0.2
0.3 2.596794536 0.3
0.4 2.479589877 0.4
0.5 2.306101511 0.5
0.6 2.06231906 0.6
0.7 1.731543002 0.7
0.8 1.293935634 0.8
0.9 0.7260033084 0.9
1.0 0.0 1.0
1.1 -0.9167590605 1.1
1.2 -2.06268654 1.2
1.3 -3.48282954 1.3
1.4 -5.229910107 1.4