TransWikia.com

Why isn't or newline working?

TeX - LaTeX Asked by pmk1007 on May 12, 2021

I can’t figure out why neither of these commands ( or newline) will work to start a new line for all of my equations.

usepackage{amsmath}
usepackage[utf8]{inputenc}


begin{document}
maketitle % showing both title and author, plus and automatic date
Consider the conic section
begin{equation}

Ax^2+Bxy+Cy^2+Dx+Ey+F=0.

end{equation}
If $Bneq0$, then to eliminate the xy term, we rotate the axes through an acute angle $theta$ where 
begin{equation}

cot(2theta)=frac{A-C}{B}.

end{equation}
In the equation
begin{equation}
11x^2-24xy+4y^2+20=0,
end{equation}
$A=11$, $B=-24$, $C=4$, $D=0$, $E=0$, and $F=20$. We will rotate the xy-axis     through an angle where
begin{equation}
cot(2theta)=frac{11-4}{-24}=frac{-7}{24}.
end{equation}
We will replace x and y with 
begin{equation}
x=Xcostheta-Ysintheta 
y=Xsintheta+Ycostheta.
end{equation}
We use the multiple angle formulas for sine and cosine that come from the   addition formulas for sine and cosine
begin{equation}
cos(2theta)=cos^2(theta)-sin^2(theta) and 
sin(2theta)=2sin(theta)cos(theta).
end{equation}

2 Answers

Is this what you're looking for

We will replace x and y with

begin{align*}
x=&Xcostheta-Ysintheta 
y=&Xsintheta+Ycostheta.
end{align*}

It is better to use align environment. If you want these equations to be numbered :

We will replace x and y with

begin{align}
x=&Xcostheta-Ysintheta 
y=&Xsintheta+Ycostheta.
end{align}

(Edit) If you want only one of the equation to be numbered :

We will replace x and y with

begin{align}
x=&Xcostheta-Ysintheta nonumber
y=&Xsintheta+Ycostheta.
end{align}

Correct answer by shahrina ismail on May 12, 2021

Let me transform my comment to the answer:

Environment equation is intended for one line equation. For multi line equations you should use amsmath or mathtools (which is extended version of amsmath˙ package) environments like gather, align, multline, split to be numbered some of them. For details, read documentation for packages for amsmath or mathtools, or see LaTeX/Mathematics.

In example below is corrected your MWE, where is demonstrated use of split and align environment (from whole MWE is shown only part with use split and align)

enter image description here

Of course, select of appropriate amsmath environment is left to you.

Answered by Zarko on May 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP