1 Arithmetic

Open and edit the script q1.m provided to you to answer the parts of this question.

(a) [1 mark]

Create the following three variables having the specified values:

  • b1 equal to -1
  • b2 equal to 2
  • b3 equal to 5

(b) [2 marks]

Create the variable named y whose value is equal to:

\[ y = \frac{1 + \frac{b1}{b2}}{1 + \cfrac{1}{1 + \cfrac{1}{b3}}} \]

You must enter the equation shown above and you must use the variables b1, b2, and b3 in your answer.

(c) [1 mark]

Create the following two variables having the specified values:

  • R equal to 2.5
  • r equal to 1.25
  • theta equal to 60 degrees

(d) [2 marks]

Create the variable named y whose value is equal to:

\[ y = (R + r) \sin(\theta) + r \sin\left(\frac{R + r}{r}\theta\right) \]

You must enter the equation shown above and you must use the variables R, r, and theta in your answer.