# Math Help - New line in latex

1. ## New line in latex

Hello
Im trying to write something using TeXnicCenter, and I want these to come on a new line. How do I do it?

Code:
        $f(x) = \tan(x^2) \\ f'(x) = \left(\tan(x^2)\right)' \cdot (x^2)' f'(x) = 2x\left(\tan^2(x^2)+1\right)$
Thanks.

2. Originally Posted by MatteNoob
Hello
Im trying to write something using TeXnicCenter, and I want these to come on a new line. How do I do it?

Code:
        $f(x) = \tan(x^2) \\ f'(x) = \left(\tan(x^2)\right)' \cdot (x^2)' f'(x) = 2x\left(\tan^2(x^2)+1\right)$
Thanks.
I may be wrong, but I think it was a double backslash ( \\ )

3. Originally Posted by MatteNoob
Hello
Im trying to write something using TeXnicCenter, and I want these to come on a new line. How do I do it?

Code:
        $f(x) = \tan(x^2) \\ f'(x) = \left(\tan(x^2)\right)' \cdot (x^2)' f'(x) = 2x\left(\tan^2(x^2)+1\right)$
Thanks.
See attachment:

RonL

4. Thank you both for the replies, but I've tried:

Code:
\documentclass[11pt,norsk,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\title{test}
\author{testauthor}

\tolerance = 5000                                                                             % LaTeX er normalt streng når det gjelder linjebrytingen.
\hbadness = \tolerance                                                                     % Vi vil være litt mildere, særlig fordi norsk har så
\pretolerance = 2000                                                                         % mange lange sammensatte ord.
\begin{document}
\maketitle{}

$f(x) = \tan(x^2) \\ f'(x) = \left(\tan(x^2)\right)' \cdot (x^2)' \\ f'(x) = 2x\left(\tan^2(x^2)+1\right) \\$

\end{document}
But this produces the following in the pdf document (see attachment picture)

Any ideas?

5. Originally Posted by MatteNoob
Hello
Im trying to write something using TeXnicCenter, and I want these to come on a new line. How do I do it?

Code:
        $f(x) = \tan(x^2) \\ f'(x) = \left(\tan(x^2)\right)' \cdot (x^2)' f'(x) = 2x\left(\tan^2(x^2)+1\right)$
Thanks.
try replacing $with and$ with .
and for better view u may use the following codes:

Code:
\documentclass[12pt,reqno]{article}

\usepackage{amsmath}

\begin{document}

\begin{aligned} f(x)=&\tan(x^{2}) \\ f^{\prime}(x)=&(\tan(x^{2}))^{\prime}\cdot(x^{2})^{\prime}\\ f^{\prime}(x)=&2x(\tan^{2}(x^{2})+1) \end{aligned}\notag

\end{document}

6. Unfortunately, that didn't help much either.

7. Originally Posted by MatteNoob
Unfortunately, that didn't help much either.
The code I gave works fine with me in Texnic Center.
Why don't you install WinEdt?

8. Weird that it doesn't work for me :\

However,Icandothemindividuallybynestingeachlinewithin$and$orthoseleadtoa(#)attherightoftheequationsthough,whichisabitannoing.

Do you know if it is possible to make the math symbols align to the left by any chance? The centered math seems a bit undordered, hehe.

I've never heard about WinEdt before, so I'll check it out. Thank you for the tip.

9. There're many alignment environments which you can use.

Following up on bkarpuz's suggestion, we gotta a point here:

Code:
\begin{aligned} f(x)=&\tan(x^{2}) \\ f^{\prime}(x)=&(\tan(x^{2}))^{\prime}\cdot(x^{2})^{\prime}\\ f^{\prime}(x)=&2x(\tan^{2}(x^{2})+1) \end{aligned}\notag
that should be,

Code:
\begin{aligned} f(x)&=\tan(x^{2}) \\ f^{\prime}(x)&=(\tan(x^{2}))^{\prime}\cdot(x^{2})^{\prime}\\ f^{\prime}(x)&=2x(\tan^{2}(x^{2})+1) \end{aligned}\notag
or even easier, you can just use \begin{align*}\end{align*} (* avoids the enumeration in each line), or use \begin{eqnarray*}\end{eqnarray*}. (This last requires a double & in the equal sign, this is, put &=&.)

10. Originally Posted by Krizalid
There're many alignment environments which you can use.

Following up on bkarpuz's suggestion, we gotta a point here:

Code:
\begin{aligned} f(x)=&\tan(x^{2}) \\ f^{\prime}(x)=&(\tan(x^{2}))^{\prime}\cdot(x^{2})^{\prime}\\ f^{\prime}(x)=&2x(\tan^{2}(x^{2})+1) \end{aligned}\notag
that should be,

Code:
\begin{aligned} f(x)&=\tan(x^{2}) \\ f^{\prime}(x)&=(\tan(x^{2}))^{\prime}\cdot(x^{2})^{\prime}\\ f^{\prime}(x)&=2x(\tan^{2}(x^{2})+1) \end{aligned}\notag
or even easier, you can just use \begin{align*}\end{align*} (* avoids the enumeration in each line), or use \begin{eqnarray*}\end{eqnarray*}. (This last requires a double & in the equal sign, this is, put &=&.)
However it does not effect much if you use &= or =&.
You should put the sign & where you want the terms to be in vertical que.
I prefer =& because when some formulas are very long you have to split them into two or more parts, and the second part should start the line with +,-,\times or sth like these, but this should be after = sign.
Let me clear it with a figure:

Code:
a=&aaaaaaaaaaaaaa
&\times aaaaaaaaa
yields the one I prefer as follows:

$a=aaaaaaaaaaaaaa$
...... $\times aaaaaaaaa$

But if you use the way, Krizalid suggested, you get

$a=aaaaaaaaaaaaaa$
... $\times aaaaaaaaa$

from

Code:
a&=aaaaaaaaaaaaaa
&\times aaaaaaaaa
or

$a=aaaaaaaaaaaaaa$
$\times aaaaaaaaa$

from

Code:
a&=aaaaaaaaaaaaaa
\times&aaaaaaaaa
However, it is better you know all, because u may sometimes need them.