It's in several references but I will use Hardy and Wright 6th edition p.587 where they use the generalized Weierstrass discriminant on p.558 to calculate the discriminant for the Frey Curve. They give the Frey Curve as
$y^2$= x (x + $a^p$) (x - $b^p$)
We can expand this to be
$y^2$= $x^3$ + ($a^p$ - $b^p$) $x^2$ - $a^p$ $b^p$ x
The general discriminant formula given has all of its terms cancel but two for this Frey Curve, and we get
$\Delta$=16 $a_2^2$ $a_4^2$ - 64 $a_4^3$
where in the Frey case
$a_2$ = ($a^p$-$b^p$) and $a_4$ = -$a^p$ $b^p$
If we then substitute to find $\Delta$ we get
$\Delta$ = 32 $a^{3p}$ $b^{3p}$ + 16 ($a^{2p}$ $b^{2p}$ $c^{2p}$)
given Frey's FLT putative solution $a^p$ + $b^p$ = $c^p$.
The problem is the second addend is the correct discriminant. The middle term only cancelled halfway leaving the first addend in the discriminant. Why did this happen? What mistake was made?
Maybe you made a small arithmetic mistake? You should get $$\Delta = 16(a^p - b^p)^2(-a^pb^p)^2 - 64(-a^pb^p)^3$$ $$= 16[(a^p+b^p)^2 - 4a^pb^p](a^pb^p)^2 + 64(a^pb^p)^3$$ $$= 16(a^p+b^p)^2(a^pb^p)^2.$$