iPhone replacement

Consider three replacement plans, $r(t)$, one for each of three different "need" functions $a(t)$

For each plan please write three separate pieces of code. Separate each part with a section break.

Remember the governing equation is: $$a(t)=a(0)f(t)+\int_0^t f(t-\tau)\cdot r^\prime(\tau)\ d\tau$$

where:

$a(t)=$ the number of iPhones "needed" at time $t$

$f(t)=$ the fraction of iPhones that were operating at time $t_*$ that are still operating at time $t+t_*$

$r(t)=$ the number of replacement phones on the interval $[0,t]$ so that there are always $a(t)$ iPhones in service

We will assume $f(t)=e^{-kt}$ where $\frac{1}{k}$ is the average time to failure. (Take Math 319 in the Spring to find out why.)

Each of your three solutions should include:

1) To help me navigate 30 of these lab write-ups, please use the template provided on Canvas.

2) Your function $a(t)$. You should provide a graph of $a(t)$ as well as an explanation of why you think the function looks like this. At least one of your functions, $a(t)$, should include a logarithm.

3) A Laplace transform solution of the governing equation for $r(t)$. Make sure to illustrate all the steps you ask Matlab to make.

4) A plot of $r(t)$ and $a(t)$ on the same set of axes. (see illustration below for how to do this)

5) Of course: use good windows for all your plots. They should reflect the size and behavior of your functions as well as the common sense context of the problem.

Warning:

Matlab defines $h(t)$ and $\delta(t)$ a little differently than the way we do. Type the following command at the beginning of your code (but after the clear all statement):

sympref('HeavisideAtOrigin',1)

I believe this will solve the problem.

In [17]:
syms t
f(t)=t^2;
g(t)=t^3;
fplot(f(t), 'color', 'blue')
hold on
fplot(g(t), 'color', 'red')
hold off
xlim([0 25])
ylim([0 500])
In [ ]: