How do you enumerate functions?
Can i just enumarte them like that:
f1[x[1],x[2],...]=...
f2[x[1],x[2],...]=...
and how do I combine the functions afterwards?
I tried it this way, but didnt work:
L[x[1],x[2],...]=f1[x[1],x[2],...]*f2[x[1],x[2],...]...
is this the right way, somehow I’m getting wrong results.
Thank you!
I would do it like this:
f1[x1_, x2_] := x1*x2;
f2[x1_, x2_] := x1 + x2;
L[x1_, x2_] := f1[x1, x2]*f2[x1, x2]
I tried this, but Mathematica still doesn’t output the resulting function.
But when I input values it puts out the correct result.
L[1,2]=6
But how can I make Mathematica output the resulting function?
I don’t quite understand what you expect as an output. Maybe this:
In[166]:= f1[x1_, x2_] := x1*x2;
f2[x1_, x2_] := x1 + x2;
L[x1_, x2_] := f1[x1, x2]*f2[x1, x2];
L[x1, x2]
Out[169]= x1 x2 (x1 + x2)
You can also try ?L to see the formula associated with the function L.