Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Clear[theta, x, y];
- f = 1/(x Cos[theta] + y Sin[theta])^(5/2);
- int = Integrate[f, theta];
- int /. theta -> 2 Pi
- int /. theta -> 0
- (int /. theta -> 2 Pi) - (int /. theta -> 0)
- (* 0 *)
- ClearAll[theta, x, y, f];
- f[{x_?NumericQ, y_?NumericQ}, theta_?NumericQ]:= 1/(x Cos[theta]^2+y Sin[theta])^(5/2);
- pts = RandomReal[{0, 1}, {5, 2}];(*10 points*)
- int = NIntegrate[Evaluate@f[#, theta], {theta, 0, 2 Pi}] & /@ pts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement