GPT4 Sucks at Integral Calculus

I was doing Trigonometric integration and it got the problem wrong twice after fixing its errors. I asked int(tan^5(x)*sec^4(x)dx) from 0 to pi/3 and it got like three steps wrong, even the simple algebra things at the end of the problem. Why is it so bad at calculus?