I have to do a substitution (u = pi/2-x) into an definite integral, which I have defined as f[u]. When I evaluate my code, no result is produced.
The code I have written is
substitute[Integrate[f[u], x], {x, 0, Pi/2}], u -> pi/2-x]
Is there something I am missing in my code that I am unaware of?
My f[u]is ((Sin[x])^n/(Cos[x])^n + (Sin[x])^n). and I am trying to substitute u = u = pi/2-x into` it.

substitute(look at documentation forReplaceAll).pishould bePi(all built-in symbols start with a capital letter). PatternBlank(_) is only used on LHS of function definition not when using the function. What is the definition of your functionf? – Bob Hanlon Apr 18 '19 at 23:40Sin^nandCos^nare the wrong syntax and shown the proper syntax. Edit your question to include the definition offusing the proper syntax. Also edit to make best effort to correct other issue that have been pointed out. – Bob Hanlon Apr 19 '19 at 00:00substitute. (Someone even posts answer usingsubstitute! ) What textbook are you guys refering to? – xzczd Apr 19 '19 at 06:15substitutefunction defined in my answer, then a proper syntax issubstitute[Integrate[f[x], {x, 0, Pi/2}], u -> pi/2 - x]. – Michael E2 Apr 19 '19 at 10:45