Is there any equation which looks like this graph in picture I was wondering if there is a function
which represent a graph in which
there is straight line with slope m and grows to $y=a$
then decreases at the same rate
once it reaches x axis it grows in negative direction with same slope and same way but with amplitude $a/n$ and so on like a dying heartbeat please help
 A: Of course there is such a function. You have drawn its graph. But there is no simple analytic expression producing this graph.
If you really want to handle the global situation in terms of formulas I suggest some simplifying measures.
In particular the graph ends at some finite time $x_*$ (which can be calculated by summing a geometric series). You should make the point $(x_*,0)$ to your new origin and let time go backwards, i.e. use $t:=x_*-x$ as new horizontal variable. The local maxima of your graph then form a geometric sequence on an ascending line through the origin, and the minima similarly on a descending line. Everything now happens in the sector between these lines, and has a "geometric periodicity". Writing $t+iy=e^w$ with complex $w$ then makes this sector a horizontal strip in the $u+iv=w$-plane, whereby $-\infty<u<\infty$. Your graph then is a truly periodic curve in this strip, but its pieces are no longer linear segments.
A: This is a piecewise linear function. The first point is the origin. The second is the intersection of $y-x_0=m(x-x_0)$ and $y=\dfrac ax$, i.e. $x_1=\sqrt{\frac am},y_1=\sqrt{am}$. The third is the intersection of $y-y_1=-m(x-x_1)$ and $y=\dfrac ax$.
You can draw a general recurrence relation between these points.
