# How to define an abstract function? [closed]

I want to define an abstract function.

For example,$a=a[x]$, whose expression is unknown. It can be used for calculation and deduction later. Assume that there are sufficient conditions, so I can get the specific expression of $a=a[x]$ finally.

My question is that which Code is needed to build $a=a[x]$?

• This post is not clear. You never want t write and expression like a = a[x] in Mathematica; evaluating it would give infinite recursion. – m_goldberg Jul 15 '17 at 7:10
• "It can be used for calculation and deduction later" In what kind of calculation and deduction? You should be more specific in this point, or I'm afraid your question is at least too board, if it's not unclear. – xzczd Jul 15 '17 at 8:03
• I have revised the statement, so maybe the question raised is clear.@m_goldberg – Robin_Lyn Jul 15 '17 at 8:04
• The calculation and deduciton procedure is a little bit complicated, so in the statement no specific expression is stated. And my point of this question is on "which code is needed to build a = a[x]"@xzczd – Robin_Lyn Jul 15 '17 at 8:08
• Just type a[x] and it is a function. For example, if you want to know its derivative, take D[a[x],x] and you get a representation of the derivative of a[x] with respect to x. On the other hand, if you asked for D[a[x],y], the derivative of a[x] with respect to y, then you get 0, as you might expect. – bill s Jul 15 '17 at 12:46

You can delay as long as you want before deciding what you want a[x] to be.

ClearAll[a, b, c, x]
a[x]  (*  a[x] *)
b[x_] := a[x] (*  a[x] *)
b  (*  a *)
c[x_] = D[a[x], x]  (*  (a^\[Prime])[x] *)
c (*  (a^\[Prime]) *)
a[x_] := x*x  (* finally we decide to define it! *)
b  (*  625 *)
c  (*  50 *)


To understand this better, read about DownValues.