An identity involving the Weierstrass ℘-function

One of the most well-known identities involving $$\wp$$ is

$$\wp'^2=4 \wp^3-g_2 \wp-g_3.$$

However, when I run the command

WeierstrassPPrime[z, {g2, g3}]^2 - (4 WeierstrassP[z, {g2, g3}]^3 -
g2 WeierstrassP[z, {g2, g3}] - g3)


I get the same thing back, rather than $$0$$. I've also tried using FullSimplify as well as FunctionExpand, to no avail. Is there a way to make Mathematica see that this expression is zero, without manually removing it?

Thank you!

• If you calculate the z derivative of the expression Mathematica simplifies it to zero. So the identity seems to be coded in somehow...
– ulvi
Commented Jul 4, 2017 at 0:30
• @ulvi Only the second-order ODE satisfied by WeierstrassP is required to show that the derivative of the identity in the question vanishes. The identity itself is not required. Commented Jul 4, 2017 at 18:33
• Strangely, FullSimplify[WeierstrassPPrime[z, {g2, g3}]^2 - (4 WeierstrassP[z, {g2, g3}]^3 - g2 WeierstrassP[z, {g2, g3}] - g3), z == 2 && g2 == 1 && g3 == 2] yields 0, but FullSimplify[(WeierstrassPPrime[z, {g2, g3}]^2 - (4 WeierstrassP[z, {g2, g3}]^3 - g2 WeierstrassP[z, {g2, g3}] - g3)) /. {z -> 2, g2 -> 1, g3 -> 2}] does not. Commented Jul 4, 2017 at 18:41
• Checking numerically, Table[ WeierstrassPPrime[z, {g2, g3}]^2 - (4 WeierstrassP[z, {g2, g3}]^3 - g2 WeierstrassP[z, {g2, g3}] - g3) /. Thread[{z, g2, g3} -> RandomComplex[{-200 (1 + I), 200 (1 + I)}, 3, WorkingPrecision -> 50]] // Chop[#, 10^-20] &, 1000] // Union evaluates to {0} Commented Jul 5, 2017 at 0:12

The following is highly unsatisfying, but it works and may be of use in simplifying more complicated expressions involving WeierstrassPPrime. Define,

tf[e_] := e /. WeierstrassPPrime[z_, {g2_, g3_}]^2 ->
(4 WeierstrassP[z, {g2, g3}]^3 - g2 WeierstrassP[z, {g2, g3}] - g3)


Then, not surprisingly,

Simplify[(WeierstrassPPrime[z, {g2, g3}]^2 - (4 WeierstrassP[z, {g2, g3}]^3 -
g2 WeierstrassP[z, {g2, g3}] - g3)), TransformationFunctions -> {Automatic, tf}]

(* 0 *)