Show that, for each rational function $h(x)$, the function $f(x)=e^{x^2}$ doesn't admit a primitive in the form $G(x)=e^{x^2}h(x)$. I'm trying this exercise:

Show that, for each rational function $h(x)$, the function $f(x)=e^{x^2}$ doesn't admit (on any interval in $\mathbb{R}$) a primitive in the form $G(x)=e^{x^2}h(x)$.

I suppose that $G'(x)=f(x) \ \ \ \rm \forall x \in I \subset \mathbb{R}$ for a interval, so $G'(x)=e^{x^2}h'(x) + h(x)e^{x^2}2x$.
But $h(x)=\dfrac{p(x)}{q(x)}$ where $p(x)$ and $q(x)$ are polynomials, so $G'(x)=e^{x^2}\dfrac{p'(x)q(x)-q'(x)p(x)}{(q(x))^2}+\dfrac{2xe^{x^2}p(x)}{q(x)}=e^{x^2}$.
Simplifying the equation I get $p'(x)q(x)-q'(x)p(x)+2xp(x)q(x)=(q(x))^2$. Now, I would like to find a contradiction, but I can't. Perhaps the I interpreted wrongly the text and the polynomials $p(x)$ and $q(x)$ are integer polynomials?
 A: A way to wrap this up is the following. Alas, this assumes that you know a few things about divisibility of polynomials.
Without loss of generality we can assume that $q(x)$ and $p(x)$ have no common factors. For we could always simply cancel that factor.
I first claim that $q(x)$ must be constant. Assume not. Then it has some irreducible polynomial $r(x)$ as a factor (so either $r(x)$ is linear, or a quadratic without real zeros). Let $n$ be the highest power such that $r(x)^n\mid q(x)$. So $n\ge1$.
Then


*

*$r(x)^{2n}$ is a factor of the right hand side.

*the polynomials $2xp(x)q(x)$ and $q(x)p'(x)$ are both divisible by $r(x)^n$.

*because the polynomial $p(x)$ is not divisible by $r(x)$, the product $p(x)q'(x)$ is divisible by $r(x)^{n-1}$ but not by $r(x)^n$.


Therefore in your equation there is only one term that is not divisible by $r(x)^n$. This is a contradiction.
Ok. So $q(x)$ is a constant. Without loss of generality $q(x)=1$. Then the polynomial $2xp(x)$ has higher degree than any other term. That is also a contradiction. Done.
