SmarterEd

Aussie Maths & Science Teachers: Save your time with SmarterEd

  • Login
  • Get Help
  • About

Calculus, MET2 2024 VCAA 17 MC

Consider the algorithm below, which prints the roots of the cubic polynomial  \(f(x)=x^3-2 x^2-9 x+18\).

\begin{array} {l}
\rule{0pt}{2.5ex} \textbf{ define} \ \text{ f (x) }  \\
\rule{0pt}{2.5ex} \quad \quad \textbf{return} \ \text{(x} ^3 - 2  \text{x}^2 - 9 \text{x} + 18) \\
\rule{0pt}{2.5ex}  \text{c} \leftarrow \text{f} \ (0) \\
\rule{0pt}{2.5ex} \textbf{if}\  \ \text{c < 0} \ \textbf{then}\\
\rule{0pt}{2.5ex} \quad \quad \text{c} \ \leftarrow \ \text{(- c)} \\
\rule{0pt}{2.5ex} \textbf{end if} \\
\rule{0pt}{2.5ex} \textbf{while} \ \text{ c > 0 } \\
\rule{0pt}{2.5ex} \quad \quad \textbf{if} \ \ \text{f (c) = 0 } \ \textbf{then}  \\
\rule{0pt}{2.5ex} \quad \quad \quad \quad \textbf{print} \ \text{c }   \\
\rule{0pt}{2.5ex} \quad \quad  \textbf{end if} \\
\rule{0pt}{2.5ex} \quad \quad  \textbf{if} \ \ \text{f (-c) = 0} \ \textbf{then} \\
\rule{0pt}{2.5ex} \quad \quad \quad \quad \textbf{print} \ \text{-c }   \\
\rule{0pt}{2.5ex} \quad \quad  \textbf{end if} \\
\rule{0pt}{2.5ex} \quad \quad  \text{c} \ \leftarrow \ \text{c - 1} \\
\rule{0pt}{2.5ex} \textbf{ end while } \\
\end{array}

In order, the algorithm prints the values

  1. \(-3, 3, 2\)
  2. \(-3, 2, 3\)
  3. \(3, 2, -3\)
  4. \(3, -3, 2\)
Show Answers Only

\(D\)

Show Worked Solution

\(\text{Solve}\ \ \ x^3-2 x^2-9 x+18=0\ \ \text{(using CAS):}\)

\(\text{Roots are:}\ \ \ x=3,\ 2, -3\)

\(\text{Using the algorithm the order is }\ c, -c,\ c-1\ \rightarrow \ 3, -3,\ 2\)

\(\Rightarrow D\)

♦♦♦ Mean mark 27%.

Filed Under: Pseudocode Tagged With: Band 6, smc-5196-25-Other

Calculus, MET2 2023 VCE SM-Bank 6 MC

Consider the algorithm below, which uses the bisection method to estimate the solution to an equation in the form \(f(x)=0\).

The algorithm is implemented as follows.
 

Which value would be returned when the algorithm is implemented as given?

  1. -0.351
  2. -0.108
  3. 3.25
  4. 3.5
  5. 4
Show Answers Only

\(D\)

Show Worked Solution

\(\textbf{Define }\text{bisection}\ (f(x),a,b,\max)\ \rightarrow\ (\sin(x), 3, 5, 2)\)

\(\text{Test for }\ i=0, 1\ \rightarrow i<\max=2\)

\(i=0\quad\) \(\text{mid}\) \(=\dfrac{3+5}{2}\) \(=4\quad [\sin(4)<0\ \text{ and }\ \sin(3)\times\sin(4)<0]\)
\(i=1\quad\) \(\text{mid}\) \(=\dfrac{3+4}{2}\) \(=3.5\quad [\sin(3.5)<0\ \text{ and }\ \sin(3)\times\sin(3.5)<0]\)

    

\(\Rightarrow D\)

Filed Under: Pseudocode Tagged With: Band 5, smc-5196-25-Other

Copyright © 2014–2025 SmarterEd.com.au · Log in