Exercise 1: matrix manipulation

There are a couple of pre-defined vectors and numbers in R, e.g., pi, letters, LETTERS, etc..

Exercise 2: functions and loops

Write a function f <- function(n) which returns a vector for the integers 1,…,n with entries TRUE or FALSE for even or odd numbers, respectively.

Exercise 3: Newton method

Given the ODE for the Verhulst model \[\dot{x} = f(x,\vec{p}) = p_1 x \left(1-\frac{x}{p_2}\right)\] find the points \(\bar{x}\) where \(\dot{\bar{x}} = 0\) numerically.

For an illustration of Newton’s method see: https://en.wikipedia.org/wiki/Newton's_method#/media/File:NewtonIteration_Ani.gif