The battery of a mobile phone discharges half every day. Every three days ($k = 3, 6, 9, ...$) the phone is charged $1Ah$ at midnight. On day $0$ it was with $0.5Ah$ charged. Determine a recursive equation in the time domain for the mobile phone battery $y (k)$ on the respective evening at $23:59h$ of the day $k$. Give $z$ transform of $y(k)$.
What I did..
0 . day - $0.5$
day - $0.25$
day - $0.125$
- day - $0.0625+05=0.5625$
- day - $0.28125$
- day - $0.140625$
day - $0.0703125+0.5=0.5703125$ $...$
$...$
$y(k)=0.5 \delta(k)+\frac{1}{2}y(k-1)....?$
I started with recursive formula but I don't know how to finish it. I used delta function for the day $0$ and $\frac{1}{2}y(k-1)$ because it will be discharged by half every day, but what to do with the part when mobile phone will be charged with $ 0.5Ah$ every three days?
Edit: It is given following hint in example: $\sum\limits_{n=0}^{\infty } z^-1=\frac{z}{z-1} $
$cos(x)=\frac{e^{ix}+e^{-ix}}{2} $
$sin(x)=\frac{e^{ix}-e^{-ix}}{2j} $