# I want to make an equation, but I can't get what I want on the correct lines

$$\frac{\partial u}{\partial x}(x,y)=f(x,y,u(x,y))$$
$$\frac{\partial u}{\partial y}(x,y)=g(x,y,u(x,y))$$
$$u(x_0,y_0)=u_0$$


I want to write this but as an equation, I have tried

$$& =\frac{\partial u}{\partial x}(x,y)=f(x,y,u(x,y))\\ & =\frac{\partial u}{\partial y}(x,y)=g(x,y,u(x,y))\\ u(x_0,y_0)=u_0$$


but can't get it to work.

Any feedback would be greatly appreciated

• 1. Don't use ; use  instead. 2. You can not use & inside an equation; use align instead of equation. Then \frac{\partial u}{\partial x}(x,y) &= f(x,y,u(x,y))\\ . – Sigur Jan 2 '15 at 14:16
• Ok thanks, but how do I get each statement onto individual lines, but for the entire equation to be marked as one equation. – Sam Houston Jan 2 '15 at 14:17
• Use aligned inside equation then. See: tex.stackexchange.com/a/171473/14757 – Sigur Jan 2 '15 at 14:19

Is this what you want:

\documentclass{scrreprt}
\usepackage{amsmath}
\begin{document}
%(xyz) as a placeholder
\begin{alignat}{2}
(xyz) &= \frac{\partial u}{\partial x}(x,y) &&=f(x,y,u(x,y))\\
(xyz) &= \frac{\partial u}{\partial y}(x,y) &&=g(x,y,u(x,y))\\
(xyz) &= u(x_0,y_0) &&=u_0
\end{alignat}
\end{document}


• Thanks for your answer, very close, just I wanted them all to be called one equation though. Ive worked out how to do it from Singur's comment above – Sam Houston Jan 2 '15 at 14:28
• The space after equal sign is wrong since the correct use is &=. – Sigur Jan 2 '15 at 14:54
• yes, i edited it... – user69453 Jan 2 '15 at 15:57
• will you also post a new image to go with the modified code? – Mico Jan 2 '15 at 15:59
• everything edited! – user69453 Jan 2 '15 at 16:11