There is an expression
(Sqrt[\[Pi]] (a b^2 d^3 + a (b^2 d^3 + 2 a (b + b d^3))) r[1, 1] r[1, 4])/(2 c^2 (b + b d^3)^(3/2)) - ( Sqrt[\[Pi]] (a b^2 d^4 + a (b^2 d^4 + 2 c (b d + b d^3))) r[5, 2] r[ 1, 4])/(2 a^2 (b d + b c^3)^(3/2))
where a
, b
, c
, d
, r[1, 1]
, r[1, 4]
, r[5, 2]
are variables.
I would like to write this expression as a function f
where a
, b
, c
, d
, r[1, 1]
, r[1, 4]
, r[5, 2]
are variables. It can be indicated that a
, b
, c
and d
are variables as follows f[a_,b_,c_,d_]:= the expression
, but how can I specify that r[1, 1]
, r[1, 4]
and r[5, 2]
are also variables f[a_,b_,c_,d_,...]:= the expression
?
f[a_,b_,c_,d_,r_]:=
the expression. $\endgroup$r[1, 1]
,r[1, 4]
,r[5, 2]
andr[1, 4]
have different values $\endgroup$allowNonSymbol
therein is exactly for the task. $\endgroup$r[1, 4]
twice in each of the four variable lists; the last time, in a comment, you give it two different values. Why? How can the same expression have two different values simulataneously? Is it a mistake? $\endgroup$f
thus:f[1,2,1,1, <|1 -> <|1 -> 2, 4 -> 3 (* or 6 *)|>, 5 -> <|2 -> 5|>|>]
. $\endgroup$