# Simple differential equation to solve

Suppose we have this differential equation:

$$x^2 + y^2 + z^2 = \frac{\frac{\partial y}{\partial x}}{x+y+z}$$

I want to find $\frac{\partial y}{\partial x}$ at x=1,y=1,z=1. I tried this code but doesn't work..

eqn[x_, y_, z_] := x^2 + y^2 + z^2 == D[y[x, z], x]/(x + y + z)

Solve[ eqn[1, 1, 1], D[y[x, z], x] ]


I get an error saying "General::ivar: 1 is not a valid variable."

I restarted mathematica and the error persists.

Too long for a comment - Your answer works, but I improvised this to my current problem and it doesn't seem to work..

Clear["Global*"]
C1 = 10^(-10);
C2 = 0.1*C1;
R = 50;
Tb = 0.1;
Geb = 5*10^-15;
Z0 = 50;
L[Te_] := 10^-9 + 10^-9*(Te - 0.1);
Zlcr[Te_, w_] := (1/R + 1/(I*L[Te]*w) + I*C1*w)^-1;
Zload[Te_, w_] := -I*w*C2 + Zlcr[Te, w];
x[Te_, w_] := Abs[\[CapitalGamma][Te, w]];
y[Te_, w_] := (Abs[\[CapitalGamma][Te, w]])^2;

eqn1 [Te_, Pprobe_, w_] := 1 - 2 Pprobe*D[x[Te, w], Plocal] ==  Geb*D[Te, Plocal]
a = Solve[eqn1 [Te, Pprobe, w], D[Te, Plocal] ]
b = D[Te, Plocal]  /. a
b /. {Te -> 1, Plocal -> 1, w -> 1}

• Te is an undefined symbol, so that D[Te, Plocal] immediately evaluates to zero (ie before Solve starts to work on it). You need to tell mathematica Te depends on Plocal, ie. use D[Te[Plocal], Plocal], or likely better dont use D function at all and use a symbol such as dTedPlocal both in the equation and in Solve – george2079 Jul 14 '14 at 18:41
• note you have the same issue with D[x[Te, w], Plocal]. x[Te,w] has no apparent dependency on Plocal so this is zero, hence your equation as written is just  1 + 0 == 0  which just evaluates to False – george2079 Jul 14 '14 at 18:47

This gives the solution to the equation:

temp = Solve[eqn[x, y, z], D[y[x, z], x]]


This extracts the value of the rule:

res = D[y[x, z], x] /. temp


This evaluates the result at the requested coordinates:

res /. {x -> 1, y -> 1, z -> 1}
`

(* {9} *)