# Tutor profile: Daphne V.

## Questions

### Subject: MATLAB

Write a recursive factorial function in MATLAB, where the input is the number you'd like to know the factorial of and the ouput is its factorial.

function [answer] = factorial(n) %Calculates the value of n! if n > 1 answer = factorial(n-1)*n; else answer = 1; end end

### Subject: Mechanical Engineering

Solve the mass spring damper system for m = 200kg, k = 100N/m, c = 50Ns/m with initial conditions x(0) = 0, $$\frac{dx}{dt} = 1$$ and no external forces. What is the position at after t = 2 seconds? Give your answer in three significant digits.

Equation of motion: $$m\frac{d^2x}{dt^2} + c\frac{dx}{dt} + kx = 0$$ $$200\frac{d^2x}{dt^2} + 50\frac{dx}{dt} + 100x = 0$$ The solution has the form of: $$x = e^{\lambda t}$$ Thus the characteristic polynomial can be written as: $$200\lambda^2 + 50\lambda + 100 = 0$$ Which results in the roots, the complex conjugate pair: $$\lambda_1 = -0.125 + 0.69597i$$ $$\lambda_2 = -0.125 - 0.69597i$$ Which gives the homogeneous solution: $$x(t) = C_1e^{(-0.125+0.69597i)t} + C_2e^{(-0.125-0.69597i)t}$$ $$x(t) = C_1e^{-0.125t}cos(0.69597t) + C_2e^{-0.125t}sin(0.69597t)$$ Using initial conditions to solve for $$C_1$$ and $$C_2$$: $$C_1 = 0$$ $$C_2 = 1.4368$$ Which gives the total solution: $$x(t) = 1.4368e^{-0.125t}sin(0.69597t)$$ At t = 2s: $$x(2) = 1.4368e^{-0.125*2}sin(0.69597*2) = 1.10 m$$

### Subject: English as a Second Language

Name all the twelve tenses and give an example sentence.

Present Simple: "I study English." Past Simple: "I studied English." Future Simple: "I will study English." Present Perfect: "I have studied English." Past Perfect: "I had studied English." Future Perfect: "I will have studied English." Present Continuous: "I am studying English." Past Continuous: "I was studying English." Future Continuous: "I will be studying English." Present Perfect Continuous: "I have been studying English." Past Perfect Continuous: "I had been studying English." Future Perfect Continuous: "I will have been studying English."

## Contact tutor

needs and Daphne will reply soon.