Could someone please help me Integrate this equation?

First off, this is not part of a problem set, this is not direct homework. I am studying for a test tomorrow and am stuck on this problem.

Integrate( (1+tan)^(1/2) )

If someone could just tell me the next step, that would be enough.

Ohhhh… Wait a sec, I farked up. The equation is (1+tan^2)^(1/2). That is easily solved with a trignometric substitution.
However, I would still like to know if the other one can be solved.

That’s sqrt(1 + tan(x)), right? I’m not sure what to do with that one. Maybe substitute for 1 + tan(x) and integrate by parts?

If, however, it were sqrt(1 + tan(x)[sup]2[/sup]), then you’d just need to apply sin(x)[sup]2[/sup] + cos(x)[sup]2[/sup] = 1 (or an equivalent equation).

Can the first one be solved? Sure, it’s a continuous function, and every continuous function is integrable.

Does it have an integral that you could write down? Well, maybe not. Actually, this one does–I’d give it to you, but I’m not sure where the parentheses go (I used The Integrator, and it gave me an ambiguous answer). But not every function has a closed form integral (i.e., one that can be finitely expressed without using an integral).

I would have thought Muad’dib could use presciense(sp?) to determine the answer from a couple of hours in the future, when he’s worked it out :smiley:

The integrand with the tan[sup]2[/sup] simplifies to Abs(Sec(x)), right? Anyway, the other, more insidious one you won’t be seeing on a test. The Integrator that ultrafilter links to seems to work fine. In this case, you’d enter the input like this:

Sqrt[1+Tan]

However, it gives you nasty results with hyperbolic arctangents and imaginary numbers, all of which we hope cancel for a real result.

Maple’s result doesn’t have any hyperbolics or explicitly complex numbers (although it does have a few log terms which might go imaginary), but it’s still pretty ugly. If you really want to know, it’s -1/4*(-sqrt(2sqrt(2)+2)ln(tan(x)+1+sqrt(2sqrt(2)+2)sqrt(1+tan(x))+sqrt(2))sqrt(2sqrt(2)-2)-4arctan((2sqrt(1+tan(x))+sqrt(2sqrt(2)+2))/(2sqrt(2)-2)^(1/2))+sqrt(2sqrt(2)+2)sqrt(2)ln(tan(x)+1+sqrt(2sqrt(2)+2)sqrt(1+tan(x))+sqrt(2))sqrt(2sqrt(2)-2)+sqrt(2sqrt(2)+2)ln(-tan(x)-1+sqrt(2sqrt(2)+2)sqrt(1+tan(x))-sqrt(2))sqrt(2sqrt(2)-2)+4arctan((-2sqrt(1+tan(x))+sqrt(2sqrt(2)+2))/(2sqrt(2)-2)^(1/2))-sqrt(2sqrt(2)+2)*sqrt(2)ln(-tan(x)-1+sqrt(2sqrt(2)+2)sqrt(1+tan(x))-sqrt(2))sqrt(2sqrt(2)-2))/(2sqrt(2)-2)^(1/2)

I sure as heck hope that wraps.

Chronos, did you try simplify(%) after you got that back?

Simplify gives you a fat lot of nothing helpful. There’s an overall factor of sqrt(2)-1 which you can pull out, and you can of course combine the logarithms, but it’s still ugly. And I have no idea how it did the integral; I’ve been sitting over in my corner perioidically trying different substitutions and getting other things that I still can’t integrate.

There are special commands to simplify using trigonometric rules and the like. I’ll play with it once I get home, unless someone else tries it first. Of course, it’s possible that there’s nothing to be done with it, but I’d like to check.

Eh, I’m pretty good with maple, but unless you can think of some relation for arctan(a) + arctan(b) (there may by one; I’m woeful with inverse trig functions), I’m stuck at A*(ln(big ugly thing) + B*(arctan(2nd big ugly thing) + arctan(3rd big ugly thing))), where A and B are some combination of sqrt(2)+1, sqrt(2)-1, and a few other things that I don’t recall off the top of my head.

Nope, I can’t get anything either. So yeah, sqrt(1 + tan(x)) does have a closed form integrand, but I’ll be damned if I see how you’d get it.

hmm… I tried making the simple change of variables u=-i*x, just because I like hyperbolic functions better, and something a bit simpler popped out of maple. Alas, I forgot to post it. And I’m at home and haven’t bothered buying maple yet.

And even if I’m not hallucinating and we get something a bit nicer… I have no idea how isqrt(1+itanh(u)) is any easier. I move we leave this problem as an exercise for the reader. (I’m going to be using this phrase a lot in my career as a text book writer… “the proof is trivial and is left as an exercise to the reader.” Very handy. :slight_smile: )

I bet, though, that this involves some really obscure transformation like (1+ln(5u-3)) = (1+tan(x))^(17/5) or something obscene like that.

Oh, and I just thought I ought to point out that there’s no reason to worry about getting imaginary numbers anywhere, since our integrand might be pure imaginary for certain values of x.

Chronos: -25% for not showing your work.

Right, so I figured it out on the way home from the office (I have this irritating 20 minute walk, and so I got busy thinking…).

First, make the substitution u = tan(x) to give an integrand of
sqrt(1+u)/(1+u[sup]2[/sup]).

Next, decompose the denominator in partial fractions:
1/(1+u[sup]2[/sup]) = i/2*(1/(u+i) - 1/(u-i))

Make another change of variables to v = sqrt(1+u). At this point, our integrand is
iv[sup]2[/sup](1/(a[sup]2[/sup]-v[sup]2[/sup]) - 1/(b[sup]2[/sup]-v[sup]2[/sup])
where a[sup]2[/sup] = 1+i and b[sup]2[/sup] = 1-i

Now notice that v[sup]2[/sup]/(a[sup]2[/sup]-v[sup]2[/sup]) = a[sup]2[/sup]/(a[sup]2[/sup]-v[sup]2[/sup]) - 1

Using this gives us something we can integrate:
i*[a[sup]2[/sup]/(a[sup]2[/sup]-v[sup]2[/sup]) - b[sup]2[/sup]/(b[sup]2[/sup]-v[sup]2[/sup])]

Both terms are elementary integrals: Int(a[sup]2[/sup]/(a[sup]2[/sup]-v[sup]2[/sup])) = a*arctanh(v/a)

So we have, in the end
i*sqrt(1+i)arctanh(v/sqrt(1+i)) - isqrt(1-i)*arctanh(v/sqrt(1-i))

and substituting in v = sqrt(1+u) = sqrt(1+tan(x)) gives the final answer:
i*sqrt(1+i)arctanh(sqrt((1+tan(x))/(1+i))) - isqrt(1-i)arctanh
(sqrt((1+tan(x))/(1-i)))
Spending a whole lot of time with arctanh(x) = 1/2
log((1+x)/(1-x)) and various other identities should eventually give the same answer as maple gets, since my answer does work out to be correct.

not holding breath waiting for congratulations and awe from the SDMB, as this was a truly truly pathetic way to spend 30 minutes, but oh well

Congratulations, awe, and all that.