Roots of equation having x in the exponent: $9^x + 2(1-a) 3^x + a = 0$ The equation to be solved is  $9^x + 2(1-a) 3^x + a = 0$. We have to find all integral values of $a$ between $1$ and $30$ for which the above equation has roots of opposite sign. 
I substituted $3^x = t$ and got the equation $ t^2 + 2(1-a)t + a= 0$. Applied Discriminant $\ge 0$. But I could not get any solution.
 A: Your substitution is good. Now you can apply the quadratic formula to solve for $t$ (in terms of $a$, of course). As noted in the comments above, you want your two values for $t$ to be both positive, one on the interval $(0,1)$, and the other on $(1,\infty)$.
I'm getting a discriminant: $4(a^2-3a+1)$, or $4((a-\frac32)^2-\frac54)$, which is negative for $a=1,2$, so we only really need to consider values of $a$ from $3$ to $30$.
The solutions for $t$ are $a-1 \pm \sqrt{a^2-3a+1}$. When $a=3$, one of these solutions is $1$, implying a root of $x=0$, which is not desired. For $a>3$ the radical satisfies the inequality: 
$$a-2 < \sqrt{a^2-3a+1} < a-1.$$
That puts the difference obtained when choosing the minus sign between $0$ and $1$, as desired. Thus, all values from $a=4$ to $a=30$ should work.
A: Obviously $a>0$ since both roots must be positive. Let $f(t)=t^2+2(1-a)t+a$ 
Note that
$$f(0^+)>0$$
$$f(\infty)>0$$
So all you need is that $f(1)<0$ for $f$ to has a root in $(0,1)$ and in a root in$(1,\infty)$
So setting $f(1)<0$,
$$f(1)=1+2(1-a)+a=-a+3<0$$
that implies
$$a \in \{4,5,...,30\}$$
A: Everything is fine until substitution .As  roots of given equation are of opposite sign this implies $0$ should lie between the roots .Therefore ,$a.f(k) \lt 0$ where $f(x)=ax^2+bx +c $ and $k$ is the number which lies between roots. 
Solution 
$$f(x)=t^2 +2(1-a)t+a \space \space\text{ where k=0,a=1}$$
$$\implies 1.(1+2(1-a)+a) \lt 0$$
$$\implies 3-a \lt 0 $$ 
$$\implies a \gt 3 $$
