\documentclass[10pt]{article}

% ---- Page geometry: 1cm margins, includeheadfoot (house style) ----
\usepackage[a4paper,margin=1cm,includeheadfoot,headsep=4pt,footskip=14pt]{geometry}

\usepackage{amsmath,amssymb}
\usepackage{array}
\usepackage[table]{xcolor}
\usepackage{enumitem}
\usepackage{fancyhdr}

% ---- House colours ----
\definecolor{ibblue}{HTML}{0F4C81}
\definecolor{accent}{HTML}{0F766E}

% ---- Header / footer ----
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{\footnotesize\color{ibblue}\bfseries Modelling with Quadratic Functions}
\rhead{\footnotesize\color{accent}IBDP Prep $\cdot$ Worked Solutions}
\cfoot{\footnotesize\thepage}
\rfoot{\footnotesize J. Murphy}

% ---- Compact lists ----
\setlist[enumerate]{nosep,leftmargin=*,labelsep=0.5em}
\setlength{\parindent}{0pt}
\setlength{\parskip}{2pt}
\setlength{\abovedisplayskip}{3pt}
\setlength{\belowdisplayskip}{3pt}
\setlength{\abovedisplayshortskip}{2pt}
\setlength{\belowdisplayshortskip}{2pt}

% ---- Question heading macro ----
\newcommand{\Q}[2]{%
  \vspace{4pt}%
  {\color{ibblue}\bfseries\large #1}\hfill{\color{accent}\itshape\small[#2 marks]}\par
  {\color{ibblue}\rule{\linewidth}{0.8pt}}\vspace{2pt}\par}

% ---- Part label ----
\newcommand{\pt}[1]{\textbf{\color{accent}#1}\;}
% ---- Boxed final answer ----
\newcommand{\ans}[1]{\fcolorbox{accent}{accent!8}{\,$\displaystyle #1$\,}}
% ---- Examiner note ----
\newcommand{\note}[1]{{\footnotesize\itshape\color{ibblue!75} #1}}

\begin{document}

\begin{center}
  {\color{ibblue}\Large\bfseries Modelling with Quadratic Functions}\\[0pt]
  {\color{accent}\footnotesize Worked Solutions \,$\cdot$\, full method and final answers}
\end{center}
\vspace{-2pt}

% ===================== Q1 =====================
\Q{Q1}{7}
\pt{(a)} Substitute the proposed ticket price $p=20$ into the model:
\[ R = 180 - 7.2(20-10)^2 = 180 - 7.2(100) = 180 - 720 = -540. \]
The model predicts $R=-540$, i.e.\ a \textbf{loss of CHF~540\,000}. A ticket price of CHF~20 is not sensible because the company would make a substantial loss rather than any revenue. \note{Substitute to get $-540$; interpret the negative value as a loss.}

\pt{(b)} Revenue is in thousands, so CHF~150\,000 corresponds to $R=150$. Solve for the boundary:
\[ 180 - 7.2(p-10)^2 = 150 \;\Rightarrow\; 7.2(p-10)^2 = 30 \;\Rightarrow\; (p-10)^2 = \frac{25}{6} \]
\[ p - 10 = \pm\sqrt{\tfrac{25}{6}} = \pm\frac{5}{\sqrt{6}} = \pm 2.041\ldots \;\Rightarrow\; p = 7.96 \text{ or } p = 12.04. \]
Revenue exceeds CHF~150\,000 between these prices, so the least possible ticket price is
\[ \ans{p = 10 - \tfrac{5}{\sqrt{6}} \approx \text{CHF}\;7.96.} \]

\pt{(c)} The model is in completed-square form with vertex $(10,\,180)$.
\begin{enumerate}[label=(\roman*)]
  \item Maximum weekly revenue $= \ans{\text{CHF}\;180\,000}$ \quad(the value $R=180$ thousand at the vertex).
  \item Ticket price that maximises revenue $= \ans{\text{CHF}\;10}$ \quad(the $p$-coordinate of the vertex).
\end{enumerate}

% ===================== Q2 =====================
\Q{Q2}{6}
The farm begins generating on 1st January 2015, so $y$ is measured in whole years from that date.

\pt{(a)} ``Up to 1st January 2016'' corresponds to $y=1$:
\[ E = 850 - 4(1-15)^2 = 850 - 4(196) = 850 - 784 = \ans{66 \text{ MWh}.} \]

\pt{(b)} $E = 850 - 4(y-15)^2$ is maximised when $(y-15)^2 = 0$, i.e.\ at $y=15$:
\[ E_{\max} = \ans{850 \text{ MWh}.} \]

\pt{(c)} ``Energy generated during 2017'' is the total at 1st Jan 2018 ($y=3$) minus the total at 1st Jan 2017 ($y=2$):
\[ E(3) = 850 - 4(3-15)^2 = 850 - 576 = 274, \qquad E(2) = 850 - 4(2-15)^2 = 850 - 676 = 174. \]
\[ \text{Energy in 2017} = 274 - 174 = \ans{100 \text{ MWh}.} \]

\pt{(d)} Valid range: $\ans{0 \le y \le 15.}$ For $y>15$ the model gives a \emph{decreasing} value of $E$, but $E$ is the \emph{cumulative} (total) energy generated, which cannot decrease over time. Hence the model only makes physical sense up to the maximum at $y=15$. \note{Reason must refer to the cumulative total being unable to fall, not merely ``$E$ decreases''.}

% ===================== Q3 =====================
\Q{Q3}{9}
\pt{(a)} At $t=0$, $h(0)=80$. The constant $80$ is the \textbf{height of the building's roof} above the ground from which the drone is launched.

\pt{(b)} Complete the square on $h(t) = -4.5t^2 + 18t + 80$:
\[ h(t) = -4.5\!\left(t^2 - 4t\right) + 80 = -4.5\!\left[(t-2)^2 - 4\right] + 80 = -4.5(t-2)^2 + 18 + 80. \]
\[ \ans{h(t) = 98 - 4.5(t-2)^2,} \qquad A=98,\; B=4.5,\; C=2. \]

\pt{(c)(i)} Ground level is $h=0$:
\[ 4.5(t-2)^2 = 98 \;\Rightarrow\; (t-2)^2 = \frac{98}{4.5} = \frac{196}{9} \;\Rightarrow\; t - 2 = \pm\frac{14}{3}. \]
This gives $t = 2 + \tfrac{14}{3} = \tfrac{20}{3}$ or $t = 2 - \tfrac{14}{3} = -\tfrac{8}{3}$. Time cannot be negative, so reject $t = -\tfrac{8}{3}$:
\[ \ans{t = \tfrac{20}{3} \approx 6.67 \text{ s}.} \]
\note{Justification: take the positive root since $t \ge 0$.}

\pt{(c)(ii)} From the completed-square form, the maximum height is $A$, reached at $t = C$:
\[ \ans{h_{\max} = 98 \text{ m}, \quad \text{at } t = 2 \text{ s}.} \]

% ===================== Q4 =====================
\Q{Q4}{6}
\pt{(i)} Lars's model $y=k(x-2)(x-6)$ through $(0,12)$:
\[ 12 = k(0-2)(0-6) = 12k \;\Rightarrow\; \ans{k = 1.} \]
\note{$(2,0)$ and $(6,0)$ are automatically satisfied as they are the roots.}

\pt{(ii)} Mia's model $y=c(x-2)^2(x-6)$ through $(0,12)$:
\[ 12 = c(0-2)^2(0-6) = -24c \;\Rightarrow\; \ans{c = -\tfrac{1}{2}.} \]

\pt{(iii)} Test the remaining data point $(3,\,1.5)$:
\[ \text{Lars: } y = (3-2)(3-6) = -3; \qquad \text{Mia: } y = -\tfrac{1}{2}(3-2)^2(3-6) = \tfrac{3}{2} = 1.5. \]
Mia's model gives exactly $y=1.5$, matching the data, whereas Lars's gives $-3$. \textbf{Mia's model is the better fit} because it also passes through the point $(3,\,1.5)$.

% ===================== Q5 =====================
\Q{Q5}{7}
\pt{(a)} The parabola passes through $O(0,0)$ and $(50,0)$, so by symmetry the maximum is at $x=25$, where $H=18$. Using vertex form $H = a(x-25)^2 + 18$ and the point $(0,0)$:
\[ 0 = a(0-25)^2 + 18 = 625a + 18 \;\Rightarrow\; a = -\frac{18}{625}. \]
\[ \ans{H = -\frac{18}{625}(x-25)^2 + 18 \;=\; \frac{36}{25}x - \frac{18}{625}x^2.} \]

\pt{(b)} The bar is at height $H=6$:
\[ -\frac{18}{625}(x-25)^2 + 18 = 6 \;\Rightarrow\; \frac{18}{625}(x-25)^2 = 12 \;\Rightarrow\; (x-25)^2 = \frac{1250}{3}. \]
\[ x = 25 \pm \sqrt{\frac{1250}{3}} = 25 \pm \frac{25\sqrt{6}}{3}. \]
So $x \approx 4.59$ or $x \approx 45.41$. The greatest horizontal distance of the bar from the end of the ramp is
\[ \ans{x = 25 + \frac{25\sqrt{6}}{3} \approx 45.4 \text{ m}.} \]

\pt{(c)} Any one reasonable limitation, e.g.\ the model \textbf{ignores air resistance} (and wind), so the real trajectory may deviate from a perfect symmetric parabola. \note{Other acceptable answers: the jumper is modelled as a particle; the model is only valid for $0 \le x \le 50$.}

\end{document}
