1. $\displaystyle \alpha$

2. ## Just testing

$\displaystyle 10\:log\:\left[\frac{\left(2\times10^{-1}}\right)^3{\left(2\times10^{-5}}\right)^3\right]\:=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\:120\:$

3. ## Debugging LaTeX

Originally Posted by Paul46
$\displaystyle 10\:log\:\left[\frac{\left(2\times10^{-1}}\right)^3{\left(2\times10^{-5}}\right)^3\right]\:=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\:120\:$
The LaTeX compiler used by this Forum is very unforgiving and very uncommunicative. So, what do you do when after entering an impressive formula like

$$10\:log\:\left[\frac{\left(2\times10^{-1}}\right)^3{\left(2\times10^{-5}}\right)^3\right]\:=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\:120\:$$

in LaTeX, you hit the Preview button and all that happens is that you get the message [LaTeX Error: Syntax error]?

Here are a few hints on how to debug your LaTeX. The first and most important one is to narrow down where the errors are occurring. Split the formula into two at some convenient break point like an = sign, so that it becomes two separate formulas:

$$10\:log\:\left[\frac{\left(2\times10^{-1}}\right)^3{\left(2\times10^{-5}}\right)^3\right]\:$$ $$=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\:120\:$$.

Now hit the Preview button and you see [LaTeX Error: Syntax error] [LaTeX Error: Syntax error].

Bad news. That means there is at least one error on both sides of the equation. But at least we are narrowing down where the errors might lie. Take the second of the two parts of the equation:

$$=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\:120\:$$.
Can we subdivide it further? Not easily, because one thing that the LaTeX compiler is very picky about is that a command like "\left(" must always be matched by a "\right)". So we can't just split this formula down the middle. What we can do is to replace everything between the "\left(" and the "\right)" by something simple, like an X. That will tell us whether the error comes inside or outside the brackets (or maybe in both places if we're unlucky). In this example, you'll have noticed by now that there is a "\left(" without any matching "\right)". So there's one error tracked down, and the second of the two halves of the formula now compiles correctly:

$$=30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\right)\:120\:$$

yields "$\displaystyle =30\:log\left(\frac{2\times10^{-1}}{2\times10^{-5}}\right)\:120\:$
". (There may still be things there that you want to change, but at least it's producing something.

Now let's look at the first part of the equation:

$$10\:log\:\left[\frac{\left(2\times10^{-1}}\right)^3{\left(2\times10^{-5}}\right)^3\right]\:$$.

The commonest error in writing LaTeX code (for me at any rate) is forgetting to close braces. Here again, the compiler is unforgiving. If you write a "{" that's not followed in the appropriate place by a matching "}" then you'll get the LateX Error message. You need to be particularly careful about this when writing complex fractions, and even more so if there are pairs of braces nested inside other pairs of braces. To see if you have gone wrong here, replace the whole of a "\frac{<numerator>}{<denominator>}" expression by a single X, and see if the formula still compiles. I'll leave you to figure out how to track down the error(s) in that part of the formula.

To sum up, the main technique in debugging LaTeX is to narrow down where the errors may be occurring, and then to use the Preview feature to see if you are making progress.

4. ## testing

$\displaystyle 34.024\:\sin\left(64\right)\:+\:23.7007\:\sin\left (51\right) = 49N$

$\displaystyle \left(5230\times4.45\right)+\left(0.15\times\left(-7.91\right)\right) = 23272.3135\:kg\:m/s$

$\displaystyle 5230 + 0.15 = 5230.15,\:5230.15\:v = 23272.3135$

$\displaystyle \sqrt 3 = 1.732$

$\displaystyle 1-0.5$

$\displaystyle \frac{3}{\left(1-\sqrt1-0.5\right)}=10.24264 secs$

$\displaystyle \frac{3}{\left(\sqrt 3\right)}$

5. $\displaystyle \log_5$

6. $\displaystyle \exists$

7. testing
$\displaystyle \frac{\partial x}{\partial y}$

$\displaystyle \partial$

Find $\displaystyle \frac{\partial f}{\partial u}$ and $\displaystyle \frac{\partial f}{\partial v}$
for
$\displaystyle u^2 f(u,v) + vf^2 (u,v) = 1$

I got $\displaystyle \frac{\partial f}{\partial u} = \frac{-2fu}{u^2+2v}$

8. $\displaystyle$
$\displaystyle \frac{1}{2}mv^2$

9. $\displaystyle$
$\displaystyle 1+2$

10. Rather than make a new thread for such a tiny problem, how would I make text such as $\displaystyle \frac {\frac{2x}{1.8}}{\frac {4}{7}}$bigger? I try to use the command suggested in the sticky but it doesn't seem to work.

Also, is there a way to combine the $$[\math]commands with colours or bold text? I can't seem to get it to work. So for example, in \displaystyle \frac{\sqrt{8}+3}{-2x} , If I wanted to make the \displaystyle \sqrt{8} red, it would come out as: \displaystyle \frac{\sqrt8+3}{-2x}  11. [tex]\frac {\displaystyle\frac{2x}{1.8}}{\displaystyle\frac {4}{7}}$$
$\displaystyle \frac {\displaystyle\frac{2x}{1.8}}{\displaystyle\frac {4}{7}}$

$$\frac{{\color{red}\sqrt8}+3}{-2x}$$
$\displaystyle \frac{{\color{red}\sqrt8}+3}{-2x}$

12. Oh. That simple. I'd never have worked it out. Thanks for the help.

13. Hello, Quacky!

How would I make text such as $\displaystyle \frac {\frac{2x}{1.8}}{\frac {4}{7}}$bigger?

Another method . . .
. . \frac{\dfrac{2}{1/8}}{\dfrac{4}{7}} . . $\displaystyle \Rightarrow\qquad \frac{\dfrac{2x}{1.8}}{\dfrac{4}{7}}$

14. There is a device (explained in The TeXbook) for making compound fractions like this look clearer by thickening the main division line.

$${\dfrac{2x}{1.8} \above1pt \dfrac{4}{7}}$$ gives $\displaystyle {\dfrac{2x}{1.8} \above1pt \dfrac{4}{7}}$.

If you really want to emphasise that line, you can make it as thick as you want:

$${\dfrac{2x}{1.8} \above2pt \dfrac{4}{7}}$$ gives $\displaystyle {\dfrac{2x}{1.8} \above2pt \dfrac{4}{7}}$.

15. Ok, so once again we are looking for a linear function to describe our data. And, as before we only need two points $\displaystyle (x,y),(x',y')$. So for the sake of convenience I will choose the first two $\displaystyle (1993,3834),(1995,4551)$. So once again let $\displaystyle \ell(x)=ax+b$ be our linear function. Remember that the $\displaystyle y$ is the same thing as $\displaystyle \ell(x)$ (like in Alg. II when they started saying $\displaystyle f(x)=2x+3$ instead of $\displaystyle y=2x+3$). So really our two points are saying that $\displaystyle (1993,3834\implies 3834=\ell(1993)=1993a+b$ and $\displaystyle (1995,4551)\implies 4551=\ell(1995)=1995a+b$. Try solving it yourself.

Solution:

Spoiler:

Subtracting the first equation from the second gives $\displaystyle 4551-3834=717=1995a+b-(1993a+b)=2a\implies a=\frac{717}{2}$ and so $\displaystyle 4551=\frac{717}{2}\cdot 1995+b\implies b=4551-\frac{717}{2}\cdot1995=b$

Page 3 of 5 First 12345 Last