0

Here is the Math question and answer that I want to typeset into LaTeX:

Math question that I want to typeset in LaTeX

Continuation

I'm using the align* environment to typeset everything and this is the code I've used:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\begin{document}
    \begin{align*}
        &\text{\textbf{Find the limit of} }\mathbf{\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}}\text{\textbf{:}}\\
        &=\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}\\
        &=\frac{(\infty)^3-7(\infty)-6(\infty)-17}{(\infty)^4-8}\\
        &\\
        &\text{Since this is an }\frac{\infty}{\infty}\text{ limit, we can use L`H}\hat{o}\text{pital's rule}\\
        &\frac{dy}{dx}(x^3-7x^2+6x-17) &&\frac{dy}{dx}(x^4-8) &\longrightarrow\text{ L`H}\hat{o}\text{pital's rule:}\\
        &=3x^2-14x+6                   && =4x^3               &\text{1st attempt}\\
        &\\
        &\text{Since this is still an }\frac{\infty}{\infty}\text{ limit, we can repeatedly use L`H}\hat{o}\text{pital's rule until we get to a result:}\\
        &\frac{dy}{dx}(3x^2-14x+6)     &&\frac{dy}{dx}(4x^3)  &\longrightarrow\text{ L`H}\hat{o}\text{pital's rule:}\\
        &=6x-14                        && =12x^2              &\text{2nd attempt}\\
        &\frac{dy}{dx}(6x-14)          &&\frac{dy}{dx}(12x^2) &\longrightarrow\text{ L`H}\hat{o}\text{pital's rule:}\\
        &=6                            && =24x                &\text{3rd attempt}\\
        &\\
        &\text{Now we have:}\\
        &\lim_{x\to\infty}\frac{6}{24x}\\
        &=\frac{6}{24(\infty)}\\
        &=\frac{6}{\infty}\\
        &=0
    \end{align*}
\end{document}

However the problem with this is that my equations go off the page and I'm unsure as to how to fix it. enter image description here

Note: The math images are from old homework and the LaTeX typesetting of this math is the current assignment I'm working on.

8
  • Welcome. // I entered your fotos directly, as links may disappear over time.
    – MS-SPO
    Jul 23, 2022 at 11:42
  • 1
    @MS-SPO Ahh thank you Jul 23, 2022 at 12:09
  • Do not incorporate text to your equations – use \intertext{…}.
    – Bernard
    Jul 23, 2022 at 12:23
  • @Bernard So do I just replace all the \text{...} with \intertext{...}, or do you mean something else? Jul 23, 2022 at 12:27
  • @PranavSundaram: It's exactly that. You also may use \shortintertext from mathtools for a better vertical spacing.
    – Bernard
    Jul 23, 2022 at 12:30

4 Answers 4

2

Does this layout befit you?

Note: needless to load amsfonts when you load amssymb – the latter already does it for you.

    \documentclass{article}
    \usepackage{mathtools}
    \usepackage{amssymb, bm}

    \begin{document}

        \begin{align*}
            \shortintertext{\bfseries{Find the limit of} $\displaystyle \bm{\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}} $ :}
            &=\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}\\
            &=\frac{(\infty)^3-7(\infty)-6(\infty)-17}{(\infty)^4-8}\\
            \intertext{Since this is an $\frac{\infty}{\infty}$, we can use L'Hôpital's rule}
            &\frac{dy}{dx}(x^3-7x^2+6x-17) &&\frac{dy}{dx}(x^4-8) &\longrightarrow\text{ L`Hôpital's rule:}\\
            &=3x^2-14x+6 && =4x^3 &\text{1st attempt}\\
            \intertext{Since this is still an $\frac{\infty}{\infty}$, we can repeatedly use L'Hôpital's rule until we get to a result:}
            &\frac{dy}{dx}(3x^2-14x+6) &&\frac{dy}{dx}(4x^3) &\longrightarrow\text{ L`Hôpital's rule:}\\
            &=6x-14 && =12x^2 &\text{2nd attempt}\\
            &\frac{dy}{dx}(6x-14) &&\frac{dy}{dx}(12x^2) &\longrightarrow\text{ L`Hôpital's rule:}\\
            &=6 && =24x &\text{3rd attempt}\\
            \intertext{Now we have:}
            &\lim_{x\to\infty}\frac{6}{24x}\\
            &=\frac{6}{24(\infty)}\\
            &=\frac{6}{\infty}\\
            &=0
        \end{align*}

        \end{document} 

enter image description here

2
  • Aha, this is exactly what I was going for!! Thank you so much for taking this time out to help me! Jul 23, 2022 at 13:32
  • You're welcome. Always glad when I can help!
    – Bernard
    Jul 23, 2022 at 13:46
2

A solution based on multiple nested math environments and left align equations

enter image description here

\documentclass{article}
\usepackage{array}
\usepackage[fleqn]{mathtools}
\usepackage{amssymb}
\usepackage{bm}

\setlength{\parindent}{0pt}
\newcommand\prelen{\hspace{15pt}}
\newlength\eqskip   \setlength\eqskip{9pt} % skips at tries


\begin{document}
\textbf{Find the limit of} \(\displaystyle \mathbf{\bm{\lim}_{x\to\infty} \frac{x^3-7x^2+6x-17}{x^4-8}}\):

\begin{align*}
    &\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8} \\
    &\prelen=\ \lim_{x\to\infty}
        \frac{(\infty)^3-7(\infty)-6(\infty)-17}{(\infty)^4-8} \\
    &\prelen=\ \frac{\infty}{\infty}
\end{align*}

Since this is an \(\displaystyle \frac{\infty}{\infty}\) limit, we can use L'Hôpital's rule:
\begin{align*}
    \begin{aligned}
        \frac{dy}{dx}\bigl(x^3-7x^2+6x-17\bigr) \\
        =\ 3x^2-14x+6
    \end{aligned}
        & \hspace{3em}
    \begin{aligned}   % {r @{\hspace{3em}} r}
        \frac{dy}{dx}\bigl(x^4-8\bigr) \\
        =\ 4x^3
    \end{aligned}
\end{align*}

Since this is still an \(\displaystyle \frac{\infty}{\infty}\) limit, we can repeatedly use L'Hôpital's rule until we get to a result:
\begin{align*}
    \begin{aligned}
        &\frac{dy}{dx}(3x^2-14x+6) \\
        &    \prelen=\ 6x - 14 \\[\eqskip]
        &\frac{dy}{dx}(6x - 14) \\
        &    \prelen=\ 6
    \end{aligned}
    &&  \begin{aligned}
            & \frac{dy}{dx}(4x^3)
                & \quad\longrightarrow
                &&& \smash{\begin{tabular}{l}
                                {L'Hôpital's rule} \\
                                (2nd try)
                            \end{tabular}} \\
            & \prelen=\ 12x^2 \\[\eqskip]
            & \frac{dy}{dx}(12x^2)
                & \quad\longrightarrow
                &&& \smash{\begin{tabular}{l}
                                {L'Hôpital's rule} \\
                                (3rd try)
                            \end{tabular}} \\
            & \prelen=\ 24x
        \end{aligned}             
\end{align*}

Now we have:
\begin{align*}
    \lim_{x\to\infty}\,\frac{6}{24x}\ &=\ \frac{6}{24(\infty)} \\
        & =\ \frac{6}{\infty} \\
        & =\ 0
\end{align*}

\end{document}
1
  • This code is definitely the most aesthetic and complex out of the responses. Thank you for this. Jul 24, 2022 at 3:58
1

There's a lot of dubious code here, so it's probably best if I just give you a corrected version, rather than listing all the changes. In short, trying to force the whole structure into a single align makes your life very difficult, because it is not what the environment is designed for. I'll say nothing about applying arithmetic operations to infinity symbols, except that it's an abomination. I would consider creating a macro for \mathrm{d} and using this in place of the ordinary 'd' in differential operators.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\begin{document}
Find the limit of 
\(\displaystyle\mathbf{\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}}\):    
\begin{align*}
\lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8} 
  &= \lim_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}\\
  &=\frac{(\infty)^3-7(\infty)-6(\infty)-17}{(\infty)^4-8}.
\end{align*}
Since this is an \(\infty/\infty\) limit, we can use L'H\^opital's rule:
\begin{align*}
&\frac{dy}{dx}(x^3-7x^2+6x-17) &\frac{dy}{dx}(x^4-8)&&\longrightarrow\text{L'H\^opital's rule:}\\
&    \quad =3x^2-14x+6         &\quad=4x^3          && \text{1st attempt}.
\end{align*}
Since this is still an \(\infty/\infty\) limit, we can repeatedly use L'H\^opital's rule until 
we get to a result:
\begin{align*}
&\frac{dy}{dx}(3x^2-14x+6) &\frac{dy}{dx}(4x^3)   &&\longrightarrow\text{L'H\^opital's rule:}\\
&\quad =6x-14              &\quad =12x^2          &&\text{2nd attempt}\\
&\frac{dy}{dx}(6x-14)      &\frac{dy}{dx}(12x^2)  &&\longrightarrow\text{L'H\^opital's rule:}\\
&\quad =6                  &\quad =24x            &&\text{3rd attempt}
\end{align*}
Now we have:
\begin{align*}
\lim_{x\to\infty}\frac{6}{24x}
        &=\frac{6}{24(\infty)}\\
        &=\frac{6}{\infty}\\
        &=0
\end{align*}
\end{document}

equations

3
  • I can't believe I didn't think of dividing it into multiple align* environments, thank you so much for this. Jul 23, 2022 at 13:16
  • @PranavSundaram --- No problem. One last point: if you want alignment between the second and third blocks, you can use Bernard's suggestion: put "Since this is still..." in an \intertext{} command and delete the surrounding \end{align} and \begin{align}. Jul 23, 2022 at 13:21
  • Alright sure! I'll do that right now. Jul 23, 2022 at 13:24
1

I would write your assignment like this:

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}

\begin{document}
\noindent\textbf{Find the limit of $\mathbf{\lim\limits_{x\to\infty}\frac{x^3-7x^2+6x-17}{x^4-8}}$ :}    
    \begin{align*}
\lim_{x\to\infty}\frac{x^3 - 7x^2+6x - 17}{x^4 - 8}
        & = \frac{(\infty)^3 - 7(\infty)-6(\infty)-17}{(\infty)^4 - 8}      \\
\intertext{Since this is an $\frac{\infty}{\infty}$ limit, we can use L'Hôpital's rule}
\frac{dy}{dx}(x^3 - 7x^2+6x - 17)     
        & = 3x^2 - 14x + 6 
                &  \longrightarrow\quad \parbox[t]{7em}{L'Hôpital's rule:\\
                                                        1st attempt}         \\
\frac{dy}{dx}(x^4 - 8)         
        & = 4x^3            
\intertext{Since this is still an $\frac{\infty}{\infty}$ limit, we can repeatedly use L'Hôpital's rule rule until we get the final result:}
\frac{dy}{dx}(3x^2-14x+6)
        & = 6x - 14       
                &  \longrightarrow\quad \parbox[t]{7em}{L'Hôpital's rule:\\
                                                        2nd attempt}         \\
\frac{dy}{dx}(4x^3)  
        & =12x^2                                                                        
\shortintertext{and}
\frac{dy}{dx}(6x-14)    
        & = 6   
                &  \longrightarrow\quad \parbox[t]{7em}{L'Hôpital's rule:\\
                                                        3rd attempt}        \\
\frac{dy}{dx}(12x^2) 
        & =24x                                                              \\
\intertext{Now we have:}
\lim_{x\to\infty}\frac{6}{24x}
        & = \frac{6}{24(\infty)} = \frac{6}{\infty}                         \\
        & = \boxed{ 0 }
    \end{align*}
\end{document}
1
  • This output is extremely pleasing to read. Thank you dude. Jul 24, 2022 at 3:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .