0

I have these lists of values but they're all packed together, how can I add a new line between them? I've tried \ and \newline and all sorts but it would come up with errors. Thanks!

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{array}

\begin{document}
  \centerline{Question 2}

    $x = \begin{array}{@{} *{3}{>{$}p{9em}<{$}} }
    -1.5  & -0.5 &  -0.804163391778384
    \end{array}$

    iteration = \hspace{8mm}1

    $x = \begin{array}[t]{@{} *{3}{>{$}p{9em}<{$}} }
    -1.5  & -0.5 &  -0.804163391778384  \\
    -0.805017312865838  &   &
    \end{array}$

    iteration = \hspace{8mm}2

    $x = \begin{array}[t]{@{} *{3}{>{$}p{9em}<{$}} }
    -1.5  & -0.5 &  -0.804163391778384  \\
    -0.805017312865838  &  -0.804950125594231
    \end{array}$

    iteration = \hspace{8mm}3

    $x = \begin{array}[t]{@{} *{3}{>{$}p{9em}<{$}} }
    -1.5  & -0.5 &  -0.804163391778384  \\
    -0.805017312865838  &  -0.804950125594231 &-0.804950131975765
    \end{array}$

    iteration = \hspace{8mm}4

    root = \\
    $-0.80495$
\end{document}



  • 1
    Your code is rather elaborate, to put it politely. Why are there so many separate array environments? What are you trying to show? – Mico Nov 5 at 5:29
  • This is the Secant Method - an iterative method to find the root of a function. I have to show the values of x for each iteration. I'm only a beginner so my knowledge on LaTex is still poor. – Achuan Chen Nov 5 at 7:43

Your Answer

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

Browse other questions tagged or ask your own question.