Mathematica: How to evaluate this function?

555 Views Asked by At

I need to evaluate a function in 2D but it has three unknowns, the two arguments (x, y) and alpha. I need to evaluate x and y between {0,100}, while alpha between {0,1}. The function is: f(x, y) = x ^ (a) * y ^ (1-a) Thank you!

1

There are 1 best solutions below

0
Rohit Namjoshi On

Not sure what "evaluate a function in 2D" means. Some options

f[x_, y_, a_] := x^a y^(1 - a)

Generate plots for different values of a

Table[Plot3D[f[x, y, a], {x, 0, 100}, {y, 0, 100}, 
        PlotLabel -> "a = " <> ToString@a], {a, 0, 1, .1}] //
  Partition[#, UpTo[4]] & //
  Grid

enter image description here

Generate contours

ContourPlot3D[f[x, y, a], {x, 0, 100}, {y, 0, 100}, {a, 0, 1}, Contours -> 5]

enter image description here