I am trying to set a function within a function. What I do is to first create a function with two arguments. Then I would like to set a new function with the same two arguments, in which the previous function is inside the new one. However, when I do this, it seems that it does not read it properly.
I would appreciate it if sb could tell me what I am doing wrong.
See code below.
Subscript[p, 1][Subscript[q, 1] _, Subscript[q, 2] _] :=
Subscript[α, 1] + γ Subscript[q, 2] +
Subscript[q, 1] Subscript[β, 1]
Subscript[Π, 1][Subscript[q, 1] _,
Subscript[q,
2] _] := (Subscript[p, 1][Subscript[q, 1], Subscript[q, 2]] -
Subscript[w, 1])*Subscript[q, 1]
Subscript[Π, 1][Subscript[q, 1] _, Subscript[q, 2] _]