Integrand size = 18, antiderivative size = 261 \[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\frac {1}{2} \left (2 a^2+b^2\right ) x+\frac {i a b e^{i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right )}{g n}-\frac {i a b e^{-i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{2 i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{-2 i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )}{g n} \] Output:
1/2*(2*a^2+b^2)*x+I*a*b*exp(I*c)*(g*x+f)*GAMMA(1/n,-I*d*(g*x+f)^n)/g/n/((- I*d*(g*x+f)^n)^(1/n))-I*a*b*(g*x+f)*GAMMA(1/n,I*d*(g*x+f)^n)/exp(I*c)/g/n/ ((I*d*(g*x+f)^n)^(1/n))+2^(-2-1/n)*b^2*exp(2*I*c)*(g*x+f)*GAMMA(1/n,-2*I*d *(g*x+f)^n)/g/n/((-I*d*(g*x+f)^n)^(1/n))+2^(-2-1/n)*b^2*(g*x+f)*GAMMA(1/n, 2*I*d*(g*x+f)^n)/exp(2*I*c)/g/n/((I*d*(g*x+f)^n)^(1/n))
Time = 0.89 (sec) , antiderivative size = 247, normalized size of antiderivative = 0.95 \[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\frac {2 \left (2 a^2+b^2\right ) g n x+2^{-1/n} b^2 e^{2 i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )+2^{-1/n} b^2 e^{-2 i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )-4 i a b (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right ) (\cos (c)-i \sin (c))+4 i a b (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right ) (\cos (c)+i \sin (c))}{4 g n} \] Input:
Integrate[(a + b*Sin[c + d*(f + g*x)^n])^2,x]
Output:
(2*(2*a^2 + b^2)*g*n*x + (b^2*E^((2*I)*c)*(f + g*x)*Gamma[n^(-1), (-2*I)*d *(f + g*x)^n])/(2^n^(-1)*((-I)*d*(f + g*x)^n)^n^(-1)) + (b^2*(f + g*x)*Gam ma[n^(-1), (2*I)*d*(f + g*x)^n])/(2^n^(-1)*E^((2*I)*c)*(I*d*(f + g*x)^n)^n ^(-1)) - ((4*I)*a*b*(f + g*x)*Gamma[n^(-1), I*d*(f + g*x)^n]*(Cos[c] - I*S in[c]))/(I*d*(f + g*x)^n)^n^(-1) + ((4*I)*a*b*(f + g*x)*Gamma[n^(-1), (-I) *d*(f + g*x)^n]*(Cos[c] + I*Sin[c]))/((-I)*d*(f + g*x)^n)^n^(-1))/(4*g*n)
Time = 0.40 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3848, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 3848 |
\(\displaystyle \int \left (a^2+2 a b \sin \left (c+d (f+g x)^n\right )-\frac {1}{2} b^2 \cos \left (2 c+2 d (f+g x)^n\right )+\frac {b^2}{2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} x \left (2 a^2+b^2\right )+\frac {i a b e^{i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right )}{g n}-\frac {i a b e^{-i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right )}{g n}+\frac {b^2 e^{2 i c} 2^{-\frac {1}{n}-2} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )}{g n}+\frac {b^2 e^{-2 i c} 2^{-\frac {1}{n}-2} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )}{g n}\) |
Input:
Int[(a + b*Sin[c + d*(f + g*x)^n])^2,x]
Output:
((2*a^2 + b^2)*x)/2 + (I*a*b*E^(I*c)*(f + g*x)*Gamma[n^(-1), (-I)*d*(f + g *x)^n])/(g*n*((-I)*d*(f + g*x)^n)^n^(-1)) - (I*a*b*(f + g*x)*Gamma[n^(-1), I*d*(f + g*x)^n])/(E^(I*c)*g*n*(I*d*(f + g*x)^n)^n^(-1)) + (2^(-2 - n^(-1 ))*b^2*E^((2*I)*c)*(f + g*x)*Gamma[n^(-1), (-2*I)*d*(f + g*x)^n])/(g*n*((- I)*d*(f + g*x)^n)^n^(-1)) + (2^(-2 - n^(-1))*b^2*(f + g*x)*Gamma[n^(-1), ( 2*I)*d*(f + g*x)^n])/(E^((2*I)*c)*g*n*(I*d*(f + g*x)^n)^n^(-1))
Int[((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_), x_Sy mbol] :> Int[ExpandTrigReduce[(a + b*Sin[c + d*(e + f*x)^n])^p, x], x] /; F reeQ[{a, b, c, d, e, f, n}, x] && IGtQ[p, 1]
\[\int {\left (a +b \sin \left (c +d \left (g x +f \right )^{n}\right )\right )}^{2}d x\]
Input:
int((a+b*sin(c+d*(g*x+f)^n))^2,x)
Output:
int((a+b*sin(c+d*(g*x+f)^n))^2,x)
\[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\int { {\left (b \sin \left ({\left (g x + f\right )}^{n} d + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*sin(c+d*(g*x+f)^n))^2,x, algorithm="fricas")
Output:
integral(-b^2*cos((g*x + f)^n*d + c)^2 + 2*a*b*sin((g*x + f)^n*d + c) + a^ 2 + b^2, x)
\[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\int \left (a + b \sin {\left (c + d \left (f + g x\right )^{n} \right )}\right )^{2}\, dx \] Input:
integrate((a+b*sin(c+d*(g*x+f)**n))**2,x)
Output:
Integral((a + b*sin(c + d*(f + g*x)**n))**2, x)
\[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\int { {\left (b \sin \left ({\left (g x + f\right )}^{n} d + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*sin(c+d*(g*x+f)^n))^2,x, algorithm="maxima")
Output:
a^2*x + 1/2*b^2*x - 1/2*b^2*integrate(cos(2*(g*x + f)^n*d + 2*c), x) + 2*a *b*integrate(sin((g*x + f)^n*d + c), x)
\[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\int { {\left (b \sin \left ({\left (g x + f\right )}^{n} d + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*sin(c+d*(g*x+f)^n))^2,x, algorithm="giac")
Output:
integrate((b*sin((g*x + f)^n*d + c) + a)^2, x)
Timed out. \[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\int {\left (a+b\,\sin \left (c+d\,{\left (f+g\,x\right )}^n\right )\right )}^2 \,d x \] Input:
int((a + b*sin(c + d*(f + g*x)^n))^2,x)
Output:
int((a + b*sin(c + d*(f + g*x)^n))^2, x)
\[ \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx=\left (\int \sin \left (\left (g x +f \right )^{n} d +c \right )^{2}d x \right ) b^{2}+2 \left (\int \sin \left (\left (g x +f \right )^{n} d +c \right )d x \right ) a b +a^{2} x \] Input:
int((a+b*sin(c+d*(g*x+f)^n))^2,x)
Output:
int(sin((f + g*x)**n*d + c)**2,x)*b**2 + 2*int(sin((f + g*x)**n*d + c),x)* a*b + a**2*x