Skip to content

Instantly share code, notes, and snippets.

@dangpzanco
Last active April 25, 2016 04:20
Show Gist options
  • Save dangpzanco/51cf23d7b7bcba354427e2c5f6fc558f to your computer and use it in GitHub Desktop.
Save dangpzanco/51cf23d7b7bcba354427e2c5f6fc558f to your computer and use it in GitHub Desktop.
Duas respostas para a mesma integral
using PyPlot
PyPlot.close("all")
## { MATLAB CODE
x = linspace(-pi/3,pi/3,100);
int1 = 0.25*sec(x).^4 - tan(x).^2 + log(abs(cos(x)));
int2 = 0.25*tan(x).^4 - 0.5*tan(x).^2 - log(abs(sec(x)));
plot(x,int1,x,int2)
C = sum(int1-int2)/length(x) # 0.25
## MATLAB CODE }
print(C)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment