# What is wrong with LaTeX in these math equations?

#### chip

Forum Staff
One of the things I'm working on is adding more libraries to MathJax. During my testing, I have found some equations to not render correctly.

Looking for some assistance from those who know LaTeX and what is wrong with the following equations to cause them to not render?

Math Equation A:

Code:
[MATH]\frac{1}{2}\cdot  \frac{\;\dfrac{(1+\sqrt{5})^n}{(1+\sqrt{5})^{n-1}} -\dfrac{1-\sqrt{5})^n}{(1+\sqrt{5})^{n-1}}\;} { \dfrac{(1+\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}} - \dfrac{(1-\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}}} \;=\; \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}[/MATH]
Math Equation B:

Code:
[MATH]\lim_{n\to\infty}\frac{F_n}{F_{n-1}} \;=\;\lim_{n\to\infty} \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}[/MATH]
Here, you can see the output for the two above equations:

$$\displaystyle \frac{1}{2}\cdot \frac{\;\dfrac{(1+\sqrt{5})^n}{(1+\sqrt{5})^{n-1}} -\dfrac{1-\sqrt{5})^n}{(1+\sqrt{5})^{n-1}}\;} { \dfrac{(1+\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}} - \dfrac{(1-\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}}} \;=\; \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}$$

$$\displaystyle \lim_{n\to\infty}\frac{F_n}{F_{n-1}} \;=\;\lim_{n\to\infty} \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}$$

#### romsek

MHF Helper
A bunch of \dfracs are missing closing }'s

chip

#### chip

Forum Staff
Ok, that makes sense.

I was trying to debug the dfracs command, and thought it reached some sort of upper limit...

Thank you for the explanation.

#### Plato

MHF Helper
MathType 7 documentation
One of the things I'm working on is adding more libraries to MathJax. During my testing, I have found some equations to not render correctly.

Looking for some assistance from those who know LaTeX and what is wrong with the following equations to cause them to not render?

Math Equation A:

Code:
[MATH]\frac{1}{2}\cdot  \frac{\;\dfrac{(1+\sqrt{5})^n}{(1+\sqrt{5})^{n-1}} -\dfrac{1-\sqrt{5})^n}{(1+\sqrt{5})^{n-1}}\;} { \dfrac{(1+\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}} - \dfrac{(1-\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}}} \;=\; \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}[/MATH]
Math Equation B:

Code:
[MATH]\lim_{n\to\infty}\frac{F_n}{F_{n-1}} \;=\;\lim_{n\to\infty} \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}[/MATH]
Here, you can see the output for the two above equations:

$$\displaystyle \frac{1}{2}\cdot \frac{\;\dfrac{(1+\sqrt{5})^n}{(1+\sqrt{5})^{n-1}} -\dfrac{1-\sqrt{5})^n}{(1+\sqrt{5})^{n-1}}\;} { \dfrac{(1+\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}} - \dfrac{(1-\sqrt{5})^{n-1}}{(1+\sqrt{5})^{n-1}}} \;=\; \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}$$

$$\displaystyle \lim_{n\to\infty}\frac{F_n}{F_{n-1}} \;=\;\lim_{n\to\infty} \frac{1}{2}\cdot\frac{(1 + \sqrt{5}) - (1-\sqrt{5})\left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}} {1 - \left(\dfrac{1-\sqrt{5}}{1+\sqrt{5}}\right)^{n-1}}}$$
Comment 1. those are just too damn long.
Whenever I use \dfrac{}{}. I always type an complete empty form then go back and fill it in. For every left{ there must be a right}.
If you need long strings I strongly suggest spring for a copy of MathType. I have used it for twenty years. It even has a translator for this forum.

topsquark and chip

#### topsquark

Forum Staff
I agree with Plato. Code that long requires some kind of assistance. I've never used Math Type (though I've heard good things about it)... I use CodeCogs. It will even save a gif of the equation that you can download. (Not just link to the site.)

-Dan

chip

#### romsek

MHF Helper
I can't say I agree that assistance is needed. I do agree with Plato's second statement that empty forms should be typed out first then filled in.
It took me some months of debugging to come to this conclusion and now I just live by it.

If I was going to LaTeX an entire thesis or even just a paper for publication yes, I'd probably use some sort of software but for just answering questions here
plain old typing and being careful seems more than enough.

topsquark and chip