2

I am trying to define a function and it apparently is not working. Here is my small working example:

f1 = Sqrt[0. + 2.09569 x^2 + 2.09569 y^2] 
K1 = 0.5;
f2 = Sqrt[30.7912 z^2 + 92.3941 v^2 + 30.7912 w^2 + 0.641399 t^2 + 74.5364 u^2 + 74.5364 m^2 + 0.641399 n^2 + 5.60933 x^2 + 0.277617 y^2]
K2 = 0.5;
fTotal[x_, y_, z_, v_, w_, t_, u_, m_, n_] := K1*f1 + K2*f2

And then I try to execute it and it does not work, for instance

fTotal[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]

What silly mistake am I making?

1 Answers1

3

Try

fTotal[x_, y_, z_, v_, w_, t_, u_, m_, n_] := Evaluate[K1*f1 + K2*f2]
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55