I am requesting help with a tree diagram in latex. I am preparing a handout on a mathematics course. In the handout I have a tree diagram which I modified from here: How can I reproduce this simple tree diagram?
While I am familiar with flow charts in tikz, I am not familiar with tree diagrams. What I am not able to put on the tree diagram are:
partial derivative as labels between variables, e.g.
$\frac{\partial z}{\partial x}$between z and x, and similar partial derivatives between z and y, x and s, x and t, y and s and y and t.
the length of each branch
I found some material on labeling on a tree diagram here: How to label nodes on a tree diagram using tikz. But I am not able to modify the code to my needs. Besides separation between variables is not good, e.g. s and t are over written at the last level Assistance will be appreciated. I hope the document is readable, because I have problems inserting text which is mathematical equations. Below is my MWE.
\documentclass[12pt]{report}
\usepackage{tikz}
\begin{document}
$\textbf{The Chain Rule (Case 2)}$\\
Suppose that `$z=f(x,y)$` is a differentiable function of x and y,\\
where $x=g(s,t)$ and $y=h(s,t)$ are both differentiable functions of s and t.\\
Then
$\frac{\partial z}{\partial s}=\frac{\partial z}{\partial x}\frac{\partial x}{s}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial s}$\qquad $\frac{\partial z}{\partial t}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t}$\\
\begin{minipage}{.8\linewidth}
The Chain Rule (Case 2) contains three types of variables: x and y and are independent
variables, s and t are called intermediate variables, z is the dependent variable.\\ Notice that this has one term for each intermediate variable and each of these terms resembles the one-dimensional Chain Rule above.\\
To remember the Chain Rule, refer to the tree diagram (right). Branches from the dependent variable z to the intermediate variables x and y indicate that z is a function of x and y. Then there are branches from x and y to the independent variables s and t. On each branch is the corresponding partial derivative.\\
To find $\frac{\partial z}{\partial s}$ find the product of the partial derivatives along each path from z to s and then add these products,\\
To find $\frac{\partial z}{\partial s}$ find the product of the partial derivatives along each path from z to s and then add these products,\\
i.e $\frac{\partial z}{\partial s}=\frac{\partial z}{\partial x}\frac{\partial x}{s}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial s}$.\\
Similarly, find $\frac{\partial z}{\partial t}$ by using the paths from z to t,\\
i.e $\frac{\partial z}{\partial t}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t}$\\
\end{minipage}
\begin{minipage}{.2\linewidth}
\begin{tikzpicture}[tn/.style={circle,inner sep=1.5pt,draw,fill}% tree node
]
\node (10) {z}
child { node (11) {x}
child { node (111) {s}}
child { node (112) {t}}}
child { node (12) {y}
child { node (121) {s}}
child { node (122) {t}}}
;
% \node[left =of 121] {};
% \node at (10 -| 11) {$\frac{\partial z}{\partial x}$};
% \node at (10 -| 12) {$\frac{\partial z}{\partial y}$};
% \node at (11 -| 111) {$\frac{\partial x}{\partial s}$};
% \node at (11 -| 112) {$\frac{\partial x}{\partial t}$};
% \node at (12 -| 121) {$\frac{\partial y}{\partial s}$};
% \node at (12 -| 122) {$\frac{\partial y}{\partial t}$};
\end{tikzpicture}
\end{minipage}%
\end{document}

\node[label=left:<label>] {...}for more concrete helpo, please merge your code fragments into one, complete document, which we can be copied and tested in our computers. – Zarko May 21 '17 at 21:41\\to end paragraphs like that. Use this only within special contexts e.g.tabular,arrayetc. – cfr May 21 '17 at 22:20