Skip to main content
added 124 characters in body
Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

We can also fix the integral region but transform the function by RotationMatrix.

f[{x_, y_}] = Log[1/(1 - Abs[x])] + Log[1/(1 - Abs[y])];
Plot[NIntegrate[
  Evaluate[f[{x, y} . RotationMatrix[θ]]], {x, -1/2, 
   1/2}, {y, -1/2, 1/2}], {θ, 0, 2 π}]
int[θ_?NumericQ] := 
 NIntegrate[
  f[{x, y} . RotationMatrix[θ]] // Evaluate, {x, -1/2, 
   1/2}, {y, -1/2, 1/2}]
FindMaximum[{int[θ], 0 <= θ <= 2 π}, {θ, .1}]

enter image description here

{0.613705, {θ -> 0.00170899}}

We can also fix the integral region but transform the function by RotationMatrix.

f[{x_, y_}] = Log[1/(1 - Abs[x])] + Log[1/(1 - Abs[y])];
Plot[NIntegrate[
  Evaluate[f[{x, y} . RotationMatrix[θ]]], {x, -1/2, 
   1/2}, {y, -1/2, 1/2}], {θ, 0, 2 π}]
int[θ_?NumericQ] := 
 NIntegrate[
  f[{x, y} . RotationMatrix[θ]] // Evaluate, {x, -1/2, 
   1/2}, {y, -1/2, 1/2}]
FindMaximum[{int[θ], 0 <= θ <= 2 π}, {θ, .1}]

We can also fix the integral region but transform the function by RotationMatrix.

f[{x_, y_}] = Log[1/(1 - Abs[x])] + Log[1/(1 - Abs[y])];
Plot[NIntegrate[
  Evaluate[f[{x, y} . RotationMatrix[θ]]], {x, -1/2, 
   1/2}, {y, -1/2, 1/2}], {θ, 0, 2 π}]
int[θ_?NumericQ] := 
 NIntegrate[
  f[{x, y} . RotationMatrix[θ]] // Evaluate, {x, -1/2, 
   1/2}, {y, -1/2, 1/2}]
FindMaximum[{int[θ], 0 <= θ <= 2 π}, {θ, .1}]

enter image description here

{0.613705, {θ -> 0.00170899}}

Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

We can also fix the integral region but transform the function by RotationMatrix.

f[{x_, y_}] = Log[1/(1 - Abs[x])] + Log[1/(1 - Abs[y])];
Plot[NIntegrate[
  Evaluate[f[{x, y} . RotationMatrix[θ]]], {x, -1/2, 
   1/2}, {y, -1/2, 1/2}], {θ, 0, 2 π}]
int[θ_?NumericQ] := 
 NIntegrate[
  f[{x, y} . RotationMatrix[θ]] // Evaluate, {x, -1/2, 
   1/2}, {y, -1/2, 1/2}]
FindMaximum[{int[θ], 0 <= θ <= 2 π}, {θ, .1}]