Solveeit Logo

Question

Question: Integrate the following: \(\int{x{{\tan }^{2}}xdx}\)....

Integrate the following: xtan2xdx\int{x{{\tan }^{2}}xdx}.

Explanation

Solution

Hint:Use Integration by parts rule by taking x as first function and tan2x{{\tan }^{2}}x as second function. Use tan2xdx=tanxx+C\int{{{\tan }^{2}}xdx}=\tan x-x+C. Use tanxdx=lnsecx+C\int{\tan xdx}=\ln \left| \sec x \right|+C and x=x22\int{x}=\dfrac{{{x}^{2}}}{2}.

Complete step-by-step answer:
Let I =xtan2x=\int{x{{\tan }^{2}}x}
Since tan2x=sec2x1{{\tan }^{2}}x={{\sec }^{2}}x-1, we have
I=x(sec2x1)dx =(xsec2xdxx)dx \begin{aligned} & \text{I}=\int{x\left( {{\sec }^{2}}x-1 \right)dx} \\\ & =\int{\left( x{{\sec }^{2}}xdx-x \right)dx} \\\ \end{aligned}
We know that (f(x)+g(x))dx=f(x)dx+g(x)dx+C\int{\left( f\left( x \right)+g\left( x \right) \right)dx}=\int{f\left( x \right)dx}+\int{g\left( x \right)dx}+C
Using the above formula, we get
I=xsec2xdxxdx =I1I2 \begin{aligned} & \text{I=}\int{x{{\sec }^{2}}xdx}-\int{xdx} \\\ & ={{\text{I}}_{1}}-{{\text{I}}_{2}} \\\ \end{aligned}
where I1=xsec2xdx{{\text{I}}_{1}}=\int{x{{\sec }^{2}}xdx} and I2=xdx{{\text{I}}_{2}}=\int{xdx}
Now we have
I1=xsec2xdx{{\text{I}}_{1}}=\int{x{{\sec }^{2}}xdx}
Integrating by parts rule if f(x)dx=u(x)\int{f\left( x \right)dx}=u\left( x \right) and ddx(g(x))=v(x)\dfrac{d}{dx}\left( g\left( x \right) \right)=v\left( x \right), then f(x)g(x)dx=g(x)u(x)u(x)v(x)dx\int{f\left( x \right)g\left( x \right)dx}=g\left( x \right)u\left( x \right)-\int{u\left( x \right)v\left( x \right)dx}
g(x) is called the first function and f(x) is called the second function.
Substituting g(x)=x and f(x) =sec2x={{\sec }^{2}}x, we have
v(x) =ddx(x)=1=\dfrac{d}{dx}\left( x \right)=1 and u(x) =sec2x=tanx=\int{{{\sec }^{2}}x=\tan x}
Hence we have
xsec2xdx=xtanxtanxdx\int{x{{\sec }^{2}}x}dx=x\tan x-\int{\tan xdx}
Now, we know that tanx=sinxcosx\tan x=\dfrac{\sin x}{\cos x}
Hence, we have
xsec2xdx=xtanxsinxcosxdx\int{x{{\sec }^{2}}xdx}=x\tan x-\int{\dfrac{\sin x}{\cos x}dx}
In the integral put cosx = t, we have dt=sinxdxdt=-\sin xdx
Hence we have
I1=xtanx+dtt{{\text{I}}_{1}}=x\tan x+\int{\dfrac{dt}{t}}
Now we know that dxx=lnx+C\int{\dfrac{dx}{x}=\ln \left| x \right|+C}
Hence we have
I1=xtanx+lnt+C{{\text{I}}_{1}}=x\tan x+\ln \left| t \right|+C
Replacing the original variable, we get
I1=xtanx+lncosx+C{{\text{I}}_{1}}=x\tan x+\ln \left| \cos x \right|+C
Also I2=xdx=x22{{\text{I}}_{2}}=\int{xdx}=\dfrac{{{x}^{2}}}{2}
Hence we have
I=xtanx+lncosxx22+C\text{I=}x\tan x+\ln \left| \cos x \right|-\dfrac{{{x}^{2}}}{2}+C
Note: Alternatively, we have
tan2xdx=(sec2x1)dx=sec2xdxdx=tanxx+C\int{{{\tan }^{2}}xdx}=\int{\left( {{\sec }^{2}}x-1 \right)dx}=\int{{{\sec }^{2}}xdx}-\int{dx}=\tan x-x+C
Now we know that
if f(x)dx=u(x)\int{f\left( x \right)dx}=u\left( x \right) and ddx(g(x))=v(x)\dfrac{d}{dx}\left( g\left( x \right) \right)=v\left( x \right), then f(x)g(x)dx=g(x)u(x)u(x)v(x)dx\int{f\left( x \right)g\left( x \right)dx}=g\left( x \right)u\left( x \right)-\int{u\left( x \right)v\left( x \right)dx}
g(x) is called the first function and f(x) is called the second function.
Substituting g(x) = x and f(x) =tan2x={{\tan }^{2}}x, we get
v(x) =ddx(x)=1=\dfrac{d}{dx}\left( x \right)=1 and u(x) = tan2xdx=tanxx\int{{{\tan }^{2}}xdx}=\tan x-x
Hence, by integration by parts rule, we have
xtan2x=x(tanxx)(secxx)dx\int{x{{\tan }^{2}}x}=x\left( \tan x-x \right)-\int{\left( \sec x-x \right)dx}
We know that (f(x)+g(x))dx=f(x)dx+g(x)dx+C\int{\left( f\left( x \right)+g\left( x \right) \right)dx}=\int{f\left( x \right)dx}+\int{g\left( x \right)dx}+C
Using the above formula, we get
xtan2xdx=x(tanxx)tanxdx+xdx =xtanxx2+lncosx+x22+C =xtanx+lncosxx22+C \begin{aligned} & \int{x{{\tan }^{2}}xdx}=x\left( \tan x-x \right)-\int{\tan xdx}+\int{xdx} \\\ & =x\tan x-{{x}^{2}}+\ln \left| \cos x \right|+\dfrac{{{x}^{2}}}{2}+C \\\ & =x\tan x+\ln \left| \cos x \right|-\dfrac{{{x}^{2}}}{2}+C \\\ \end{aligned}
which is the same as obtained above.
[2] Although there is no general rule in choosing the first and second functions in Integration by parts, the most common order of preference for the first function is given by ILATE rule
I = Inverse trigonometric functions
L = Logarithmic functions
A = Algebraic expressions
T = Trigonometric functions
E = Exponential functions.