How to write recursive functions in mathematics Okay this is a really stupid question, but anyways.

Action isn't just the effect of motivation; it is also the cause of
  it. 
~ "The subtle art of not giving a f*ck", Mark Manson

If I take variable action as a and variable motivation as m, I want to write a simple equation f(a, m) to state the above fact mathematically. Here my confusion is that we know cause leads to effect and is its precursor, but the above statement makes the action f(a) as both cause and effect. So, how do I write f(a, m)?
The second part of this question is what would happen if I add a third variable,  inspiration f(i).

The thing about motivation is that it's not only a three-part chain,
  but am endless loop:
Inspiration -> Motivation -> Action -> Inspiration -> Motivation ->
  Action -> ...

I want to reorient above as
Action -> Inspiration -> Motivation
So, how do I write or hypothese f(a,i,m).

$$a_t=m(a_{t-1})$$
This recursive formula treats motivation as the function and actions as both the input and output to that function. In other words, motivation has a predefined relationship with action, whereby actions cause motivation which produces the next action.
With inspiration:
$$a_t = m(i(a_{t-1}))$$
or in English, action inspires motivation which produces the next action. Your next action is determined by motivation, which is a function of inspiration, which is a function of your previous action.
