I would like to make 3D plot of the following function. F[x_]:=(x D[EllipticTheta[3, 0, E^(-Pi x)], {x, 2}] + (3/2) D[EllipticTheta[3, 0, E^(-Pi x)], {x, 1}]) x^(5/4)) It did not work with F[1.0]. The error message is: General::ivar: 1.` is not a valid variable. So I define it as: G[y_]:=((x D[EllipticTheta[3, 0, E^(-Pi x)], {x, 2}] + (3/2) D[EllipticTheta[3, 0, E^(-Pi x)], {x, 1}]) x^(5/4)))//.x->y I can now do: Plot[F[t], {t, 0, 3/2}] Plot[F[I t], {t, -Pi/2, Pi/2}] Is there a proper way to define F[x] without using replacement?