how do you integrate ((e^x+cos[x])^2)?
(how do you integrate (e^x+cos[x])^2)?
Update:i know the answer to be e^xCos[x] + (e^(2*x) + x + (2*e^x + Cos[x])*Sin[x])/2
I just figure out how to get to it?
distribute?
1.) integral (e^(2x)+2e^xcos[x]+cos^2[x]
2.).....?
Comments
By expanding:
∫ [e^x + cos(x)]^2 dx
= ∫ [e^(2x) + 2e^x*cos(x) + cos^2(x)] dx
= ∫ e^(2x) dx + 2 ∫ e^x*cos(x) dx + ∫ cos^2(x) dx.
The first integral can be found by letting u = 2x ==> du = 2 dx to get:
∫ e^(2x) dx = (1/2)e^(2x) + C.
The second integral needs two rounds of integration by parts. First, let:
u = e^x ==> du = e^x dx
dv = cos(x) dx ==> v = sin(x).
Then:
∫ e^x*cos(x) dx = uv - ∫ v du
= e^x*sin(x) - ∫ e^x*sin(x) dx.
Next, integrate ∫ e^x*sin(x) dx by parts with:
u = e^x ==> du = e^x dx
dv = sin(x) dx ==> v = -cos(x) dx.
So:
∫ e^x*cos(x) dx = e^x*sin(x) - ∫ e^x*sin(x) dx
= e^x*sin(x) - (uv - ∫ v du)
= e^x*sin(x) + e^x*cos(x) - ∫ e^x*cos(x) dx.
This implies that:
∫ e^x*cos(x) dx = e^x*sin(x) + e^x*cos(x) - ∫ e^x*cos(x) dx.
Adding ∫ e^x*cos(x) dx to both sides:
2 ∫ e^x*cos(x) dx = e^x*sin(x) + e^x*cos(x).
Dividing both sides by 2 and tacking on the integration constant:
∫ e^x*cos(x) dx = (1/2)e^x*sin(x) + (1/2)e^x*cos(x) + C.
The third integral can by found by noting that:
cos^2(x) = [1 + cos(2x)]/2.
Hence:
∫ cos^2(x) dx
= 1/2 ∫ [1 + cos(2x)] dx
= (1/2)x + (1/4)sin(2x).
Finally:
∫ [e^x + cos(x)]^2 dx
= ∫ e^(2x) dx + 2 ∫ e^x*cos(x) dx + ∫ cos^2(x) dx
= (1/2)e^(2x) + e^x*sin(x) + e^x*cos(x) + (1/2)x + (1/4)sin(2x) + C.
I hope this helps!
First expand:
(e^x + cos x)^2 = (e^x)^2 + 2*(e^x)*(cos x) + (cos x)^2
= e^(2x) + 2e^x cos x + cos^2 x
Note that cos(2x) = 2cos^2 x - 1 so that cos^2 x = (cos(2x) + 1) / 2
So (e^x + cos x)^2 = e^(2x) + cos(2x)/2 +1/2 + 2e^x cos x
The integral of e^(2x) is 1/2 * e^2x
The inegral of cos(2x) / 2 = sin(2x) / 4
The inegral of 1/2 is 1/2 x
It is left to find ∫2e^x cosx dx or 2*∫e^x cosx dx
Let's integrate it by parts. u = e^x, dv = cos x dx, so that du = e^x dx and v = sinx
So 2 ∫e^x cosx dx = 2 ( e^x * sin x - ∫sin x* e^x dx ) (*)
Now let's integrate ∫e^x sin x dx by parts
Similarly we get: ∫e^x sin x dx = - e^x* cos x + ∫e^x cos x dx
Plug this in (*):
2 ∫e^x cosx dx = 2 ( e^x * sin x - (-e^x * cos x + ∫e^x cosx dx) )
2 ∫e^x cosx dx = 2 e^x * sin x + 2 e^x * cos x - 2 ∫e^x cosx dx
Take the "- 2 ∫e^x cosx dx" from the right hand side to the left one
2 ∫e^x cosx dx + 2 ∫e^x cosx dx = 2 e^x * sin x + 2 e^x * cos x
4 ∫e^x cosx dx = 2 e^x * sin x + 2 e^x * cos x
2 ∫e^x cosx dx = (e^x * sin x + e^x * cos x)
Combining all these results, the final answer will be
1/2 * e^2x + sin(2x) / 4 + x/2 + (e^x * sin x + e^x * cos x)
Carefully. You have to expand the binomial and integrate each term.
((e^x+cos[x])^2) = e^(2x) + 2 e^x cos(x) + [cos(x)]^2.
Integrating e^(2x) is straightforward.
Integrating 2 e^x cos(x) requires two iterations of integration by parts, plus knowing what to do when you get the original integrand back.
To integrate [cos(x)]^2, use the substitution [cos(x)]^2 = 1/2 * (1 + cos (2x)). Each of those terms is easy to integrate.
expanding binomially we get,
e^2x + (cos[x])^2 + 2*e^x*(cos[x])
term 1 : e^2x . integrating this : e^2x/2 + c1
term 2: (cos[x])^2= (1+cos[2x])/2= 1/2 + cos[2x]/2 : integrating this: x/2+ sin[2x]/4 +c2
term 3 : integral(2*e^x*cos[x])= T = we have to find
integrate by parts twice : 2*{e^x * (sin[x]) - integral( e^x *sin[x])}
= 2*{e^x * (sin[x]) - {e^x * (-cos[x])- integral(e^x * (-cos[x]))} }
= 2*{e^x * (sin[x]) - {e^x * (-cos[x]) + T}}
= 2*{e^x * (sin[x]) + e^x * (cos[x]) -T}
T = {2*e^x * (sin[x])} + {2*e^x * (cos[x])} -2T
thus, 3T = 2* e^x * (sin[x]+cos[x])
=> T = {2* e^x * (sin[x]+cos[x])}/3 +c3
now add all the answers of term 1, term 2 and term 3 which equals,
= (e^2x/2 + c1) + (x/2+ sin[2x]/4 +c2) + ({2* e^x * (sin[x]+cos[x])}/3 +c3)
= e^2x/2 + x/2+ sin[2x]/4 + {2* e^x * (sin[x]+cos[x])}/3 + c1+c2+c3
let c1+c2+c3=C
thus answer is : e^2x/2 + x/2+ sin[2x]/4 + {2* e^x * (sin[x]+cos[x])}/3 + C
pre-requisites: 1.basic integrals of e^x,sin[x],cos[x]; 2.Integration by parts.3 binomial theorm here degree is 2.
Hope it hepled!
e^x Cos[x] + 1/2 (e^(2 x) + x + (2 e^x + Cos[x]) Sin[x])
?(sinx + cosx)^2 dx = ?(sin^2x + 2sinx cosx + cos^2x) = sin^2x + sin(2x) + cos^2(x) sin^2x = a million - cos^2x = a million - cos^2x + sin(2x) + cos^2(x) = a million + sin(2x) ?(a million + sin(2x))dx ?1dx + ?sin(2x) dx x - (a million/2)cos(2x) + C