0

enter image description here

How can i align these examples in the middle or left? Here is the code I used:

\begin{align} 
\int3x^2dx\\
\int \frac{dx}{x^4}\\
\int x^{\frac{3}{2}}\\
\int \frac{dx}{x^{\frac{5}{2}}}\\
\int5a^3 da\\
\int \frac{dt}{t^3}\\
\int x^2t^3dx\\
\end{align}
1

Is it possible to use also flalign or alignat enviroments:

\documentclass[a4paper,12pt]{article}

\usepackage{amsmath,amssymb}

\begin{document}
\begin{flalign}
&\int3x^2dx\\
&\int \frac{dx}{x^4}\\
&\int x^{\frac{3}{2}}\\
&\int \frac{dx}{x^{\frac{5}{2}}}\\
&\int5a^3 da\\
&\int \frac{dt}{t^3}\\
&\int x^2t^3dx
\end{flalign}

\begin{alignat}{1}
&\int3x^2dx\\
&\int \frac{dx}{x^4}\\
&\int x^{\frac{3}{2}}\\
&\int \frac{dx}{x^{\frac{5}{2}}}\\
&\int5a^3 da\\
&\int \frac{dt}{t^3}\\
&\int x^2t^3dx
\end{alignat}


\end{document}

enter image description here

5

Add the alignment symbol & where you want to align in each line.

\begin{align}
     & \int3x^2dx                      \\
     & \int \frac{dx}{x^4}             \\
     & \int x^{\frac{3}{2}}            \\
     & \int \frac{dx}{x^{\frac{5}{2}}} \\
     & \int5a^3 da                     \\
     & \int \frac{dt}{t^3}             \\
     & \int x^2t^3dx
\end{align}
2

As explained is @Amita's answer, you can put a & wherever you want to place the alignment point in the align environment. Hence, to align your equations on the left, you can simply begin each line with &.

If you want to align your equations on the middle, that is, if you want to center them, you could use the gather environment instead of align, as in the following example.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather} 
\int3x^2dx\\
\int \frac{dx}{x^4}\\
\int x^{\frac{3}{2}}\\
\int \frac{dx}{x^{\frac{5}{2}}}\\
\int5a^3 da\\
\int \frac{dt}{t^3}\\
\int x^2t^3dx
\end{gather}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.