The integral of the square root of a square is a sign of trigonometric substitution.
Trig substitution means we want a square under the radical. So let's complete the square.
27-6x-x2=(9-6x-x2)+18=-(x2+6x+9)+18=-(x+3)2+18=18-(x+3)2
This leaves us with a difference of squares (we'll treat 18 as a square. Yes, it will be irrational.) So which Pythagorean identity deals with a difference of squares?
cos2(u)=1-sin2(u) works. So we want (x+3)2=sin2(u). Except we're scaling by 18, so make that (x+3)2=18sin2(u)
x=√(18)sin(u)-3
dx=√(18)cos(u)du
So let's substitute into our integral.
∫√(18-(x+3)2)dx
∫√(18-((√(18)sin(u)-3)+3)2 ·√(18)cos(u)du (substitute)
∫√(18-18sin2(u)) ·√(18)cos(u)du (cancel the 3's and compute the square)
∫√(18(1-sin2(u)) ·√(18)cos(u)du (factor out the 18)
∫√(18cos2(u)) ·√(18)cos(u)du (replace by the Pythagorean identity)
∫√(18)cos(u) ·√(18)cos(u)du (compute the square root)
√(18)·∫cos2(u) du (factor out the √18 and take it outside the integral)
√(18)·∫(1/2)(1-cos(2u)) du (half-angle formula cos2(u)=(1/2)(1-cos(2u))
(√(18)/2)∫1-cos(2u) du (take the 1/2 out of the integral)
(√(18)/2)(u-sin(2u)/2) (compute the integral, finally)
Now, we need to express this in terms of x, our original variable.
We have u=arcsin(x+3), from our original substitution.
Simply plugging in gives (√(18)/2)·(arcsin(x+3)-sin(2arcsin(x+3))/2)+C
This, technically, is a correct answer. But we can simplify sin(2arcsin(x+3)). Let arcsin(x+3)=v. So we have sin(2v).
Double-angle identities give sin(2v)=2sin(v)cos(v). Back-substituting gives sin(2arcsin(x+3))=2(x+3)cos(arcsin(x+3)).
Now to simplify cos(arcsin(x+3)). First, consider sin2(x)+cos2(x)=1. Substitute x=arcsin(w). So we get sin2(arcsin(w))+cos2(arcsin(w))=1
w2+cos2(arcsin(w))=1
cos2(arcsin(w))=1-w2
cos(arcsin(w))=√(1-w2)
Let w=x+3 to get cos(arcsin(x+3))=√(1-(x+3)2).
So sin(2arcsin(x+3))=2(x+3)cos(arcsin(x+3))=2(x+3)√(1-(x+3)2)
Finally, substituting back into the bolded expression gives
(√(18)/2)·(arcsin(x+3)-(x+3)√(1-(x+3)2))+C