For a non-parts approach
#I = int(2+sin(x/2))^2cos(x/2)dx#
Expanding that
#I = int(4+4sin(x/2)+sin^2(x/2))cos(x/2)dx#
And that
#I = int4cos(x/2)dx + int4sin(x/2)cos(x/2)dx + intsin^2(x/2)cos(x/2)dx#
The first integral is easy
#I = 8sin(x/2) + int4sin(x/2)cos(x/2)dx + intsin^2(x/2)cos(x/2)dx#
The second is easy if you remember that
#sin(alphax)cos(alphax) = sin(2alphax)/2#, so
#I = 8sin(x/2) + int2sin(x)dx + intsin^2(x/2)cos(x/2)dx#
#I = 8sin(x/2) -2cos(x) + intsin^2(x/2)cos(x/2)dx#
If you remember #sin^2(theta) = 1 -cos^2(theta)#
#I = 8sin(x/2) -2cos(x) + int(1 - cos^2(x/2))cos(x/2)dx#
#I = 8sin(x/2) -2cos(x) + intcos(x/2)dx - intcos^3(x/2)dx#
#I = 8sin(x/2) -2cos(x) + 2sin(x/2)- intcos^3(x/2)dx#
And now, use #cos^2(x/2) = 1 - sin^2(x/2)#
#I = 10sin(x/2) -2cos(x) - int(1-sin^2(x/2))cos(x/2)dx#
Say #u = sin(x/2)# so #du = cos(x/2)/2#
#I = 10sin(x/2) -2cos(x) -2 int(1-sin^2(x/2))cos(x/2)/2dx#
#I = 10sin(x/2) -2cos(x) -2 int(1-u^2)du#
#I = 10sin(x/2) -2cos(x) -2u + (2u^3)/3 + c#
Switching it back to #x#
#I = 10sin(x/2) -2cos(x) -2sin(x/2) + 2/3sin^3(x/2) + c#