# Merging leaves in a forest tree

I am trying to get the leaves a a tree to converge, like this: But I don't want B_{n-2}(x) to be drawn twice, I want B_{n-2}(x) to be at the terminus of two lines, one originating from B_{n-1}(x+1/2), and the other originating from B_{n-1}(x-1/2).

Is this possible?

Here's my current code:

\documentclass{article}
\usepackage{forest}

\begin{document}
\begin{forest}
[$B_n(x)$
[$B_{n-1}(x+1/2)$
[$B_{n-2}(x+1)$]
[$B_{n-2}(x)$]
]
[$B_{n-1}(x-1/2)$
[$B_{n-2}(x)$]
[$B_{n-2}(x-1)$]
]
]
\end{forest}
\end{document}


Multidominant structures are not trees any more, and so the standard tree packages don't have a good way to deal with them. The general technique is to make a node with no edge and then draw the edges to the shared node manually:

\documentclass{article}
\usepackage{forest}
\usetikzlibrary{positioning}
\begin{document}
\begin{forest}for tree={math content}
[B_n(x)
[B_{n-1}(x+1/2),name=S1
[B_{n-2}(x+1)]
[B_{n-2}(x),phantom]
]
[B_{n-2}(x),tier=term,no edge,name=shared]
[B_{n-1}(x-1/2),name=S2
[B_{n-2}(x),phantom]
[B_{n-2}(x-1),tier=term]
]
]
\draw (S2) -- (shared);
\draw (S1) -- (shared);
\end{forest}
\end{document} 