Challenging Integral Calculation: e^(-1/cos^2x) from 0 to pi/4

In summary, the value of the integral from 0 to pi/4 of exp(-1/cos^2x) is not recognized by Plouffe's inverter, but can be expressed in terms of the error function. The process involves finding the derivative of the integral with respect to the parameter, integrating that expression with respect to x, and then integrating the result with respect to the parameter. The final expression can be written as a multiple of the error function.
  • #1
dirk_mec1
761
13

Homework Statement



[tex]
\int_{0}^{\pi/4} \exp \left(-\frac{1}{\cos^2x}\right)\mbox{d}x
[/tex]

The Attempt at a Solution


Can someone give me a hint? I don't see a smart substitution nor a path via integration by parts...
 
Physics news on Phys.org
  • #3
yyat said:
The value of the integral, whatever it is, is not going to have a simple form: The "[URL value[/URL] is not recognized by http://bootes.math.uqam.ca/cgi-bin/ipcgi/lookup.pl?Submit=GO+&number=.227651878&lookup_type=browse".

Edit: I think I overestimated the capabilities of Plouffe's inverter, so maybe the solution is simple afterall.

You are right. Plouffe's inverter is not all powerful. It only knows about numbers it's happened to have heard about. But there is a reasonably simple expression. You do need the erf function. Write the integral as exp(-a*sec(x)^2). Find d/da of that. Now THAT function you can integrate dx from 0 to pi/4 (in terms of erf). You can in turn integrate that expression da. And you know the value if a=0. It's not terribly simple, to find the constant of integration you need to figure out things like lim a->0 erf(sqrt(a))/sqrt(a). But it can be done. You might want to put (pi/4)*(1-erf(1)^2) into Plouffe's inverter.
 
Last edited by a moderator:
  • #4
Dick said:
Write the integral as exp(-a*sec(x)^2). Find d/da of that.
[tex]

\frac{d}{da}\ \left[ \int_{0}^{\pi/4} \exp \left(-a \cdot \sec^2 (x) \right) \mbox{d}x \right ] = \int_{0}^{\pi/4} - \sec^2(x) \cdot \exp \left(-a \sec^2 x\ \right) \mbox{d}x

[/tex]

Now THAT function you can integrate dx from 0 to pi/4 (in terms of erf)..
hmmm...I don't see how because:

[tex] \operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2} dt. [/tex]
 
  • #5
Be creative! You have to be. This whole problem is about trickyness. sec(x)^2=1+tan(x)^2. Now substitute t=sqrt(a)*tan(x). You know there is an answer. I sketched the route. I even gave you a really strong hint what the answer was. Try and figure out one or two of the non-obvious steps without the need for a hint.
 
Last edited:
  • #6
[tex]
\frac{dI}{da}=\int_{0}^{\pi/4} - \sec^2(x) \cdot \exp \left(-a \sec^2 x\ \right) \mbox{d}x = ( -e^{-a}) \cdot \int_0^{\pi /4} \sec^2(x) \cdot \exp (-a \tan^2 x )\ \mbox{dx}

[/tex]Now with

[tex] t =\sqrt{a} \tan(x) \longrightarrow t^2 = a \tan^2(x) [/tex]

and

[tex] dt = \sqrt{a} \sec^2(x) [/tex]
I get:

[tex] \frac{dI}{da} = \frac{-e^{-a}}{ \sqrt{ a} } \cdot \int_0^{ \pi /4} e^{-t^2} \mbox{d}t =\frac{-e^{-a}}{ \sqrt{ a} } \cdot \mbox{erf} ( \pi /4) [/tex]
 
  • #7
Not quite. The argument of the erf is t. t isn't equal to tan(x). Now keep going.
 
  • #8
Dick said:
Not quite. The argument of the erf is t. t isn't equal to tan(x). Now keep going.

This isn't the most easy integral I tackled :rolleyes:

Ok, so the boundaries are wrong (that's what you meant in your last post, right Dick?) [tex]
\frac{dI}{da} = \frac{-e^{-a}}{ \sqrt{ a} } \cdot \int_0^{ \sqrt{a}} e^{-t^2} \mbox{d}t =\frac{-e^{-a}}{ \sqrt{ a} } \cdot \mbox{erf} ( \sqrt{a})
[/tex]

right?
 
  • #9
You are getting there. There's also a 2/sqrt(pi) in the erf definition. What happened to that?
 
  • #10
Dick said:
You are getting there. There's also a 2/sqrt(pi) in the erf definition. What happened to that?

[tex]

\frac{dI}{da} = \frac{-e^{-a}}{ \sqrt{ a} } \cdot \int_0^{ \sqrt{a}} e^{-t^2} \mbox{d}t = \left( \frac{ \sqrt{ \pi}}{2} \right) \left( \frac{-e^{-a}}{ \sqrt{ a} } \right) \cdot \mbox{erf} ( \sqrt{a})

[/tex]
 
  • #11
Good. Now can you integrate that da? It's creative time. It's not NEARLY as hard as it looks. Think u substitution.
 
  • #12
Now with [tex]u=\sqrt{a}[/tex]

I get:

[tex] \int \left( \frac{ \sqrt{ \pi}}{2} \right) \left( \frac{-e^{-a}}{ \sqrt{ a} } \right) \cdot \mbox{erf} ( \sqrt{a}) \mbox{d}a =\int (-\sqrt{ \pi}) \cdot e^{-u^2} \cdot \mbox{erf} (u)\ \mbox{d}u = C \cdot \int \int e^{u^2-t^2}\ \mbox{d}t \mbox{d}u
[/tex]

This is getting nasty...
 
  • #13
If u=erf(sqrt(a)), what's du? Or since you've already done that u substitution for sqrt(a), if v=erf(u), what's dv?
 
  • #14
Dick said:
If u=erf(sqrt(a)), what's du? Or since you've already done that u substitution for sqrt(a), if v=erf(u), what's dv?

Of course! The derative of erf(v) is e-v2 !

But then

[tex] \int \left( \frac{ \sqrt{ \pi}}{2} \right) \left( \frac{-e^{-a}}{ \sqrt{ a} } \right) \cdot \mbox{erf} ( \sqrt{a}) \mbox{d}a =\int (-\sqrt{ \pi}) \cdot e^{-u^2} \cdot \mbox{erf} (u)\ \mbox{d}u = C_1 \cdot \mbox{erf} (u) + C_2

[/tex]With the very important integration constant C2, right?
 
  • #15
dirk_mec1 said:
Of course! The derative of erf(v) is e-v2 !

Dead right, but don't forget the sqrt(pi) and 2 parts of the erf definition. That's why it's actually an easy integral. But doing the v=erf(u) substitution turns the integral into v*dv, right? What's that? And there's no 'integration constant' C1. You know what C1 is. C2 is important, yes.
 
  • #16
Dick said:
Dead right, but don't forget the sqrt(pi) and 2 parts of the erf definition. That's why it's actually an easy integral. But doing the v=erf(u) substitution turns the integral into v*dv, right? What's that?
Right, I'll try again:

[tex]
\int \left( \frac{ \sqrt{ \pi}}{2} \right) \left( \frac{-e^{-a}}{ \sqrt{ a} } \right) \cdot \mbox{erf} ( \sqrt{a}) \mbox{d}a =\int (-\sqrt{ \pi}) \cdot e^{-u^2} \cdot \mbox{erf} (u)\ \mbox{d}u = (\sqrt{ \pi}) \frac{ \sqrt{\pi} }{2} \int v\ \mbox{d}v = \frac{1}{4} \pi v^2 +C_0
[/tex]I previously used C_1 to 'hide' all constants but I didn't specify that, C_0 is here the constant of integration multiplied by some factor. Is this correct, Dick?
 
  • #17
You forgot the minus sign. So you've got -pi*erf(sqrt(a))^2/4+C. Now how to determine C?
 
  • #18
If a = 0 then


[tex]

\int_{0}^{\pi/4} \exp \left(-\frac{a}{ \cos^2x}\right)\mbox{d}x = \frac{ \pi}{4}

[/tex]



So I conclude that:

[tex] \frac{\pi}{4} = \left( \frac{- \sqrt{\pi}}{2} \right) \cdot \lim_{a \rightarrow 0} \int e^{-a} \cdot \frac{ \mbox{erf} (\sqrt{a}) }{\sqrt{a}}\ \mbox{d}a [/tex]
 
  • #19
dirk_mec1 said:
If a = 0 then [tex]

\int_{0}^{\pi/4} \exp \left(-\frac{a}{ \cos^2x}\right)\mbox{d}x = \frac{ \pi}{4}

[/tex]

Right, but for all [itex]a[/itex] you just showed

[tex]\int_{0}^{\pi/4} \exp \left(-\frac{a}{ \cos^2x}\right)\mbox{d}x = \frac{1}{4} \pi \mbox{erf}(\sqrt{a})^2 +C_0[/tex]
So I conclude that:

[tex] \frac{\pi}{4} = \left( \frac{- \sqrt{\pi}}{2} \right) \cdot \lim_{a \rightarrow 0} \int e^{-a} \cdot \frac{ \mbox{erf} (\sqrt{a}) }{\sqrt{a}}\ \mbox{d}a [/tex]

Not a very useful conclusion; try solving for [itex]C_0[/itex] instead.

What is [tex] \frac{1}{4} \pi \mbox{erf}(\sqrt{a})^2 +C_0[/tex] for a=0?
 
  • #20
So [tex]C_0 =0[/tex]
 
  • #21
dirk_mec1 said:
So [tex]C_0 =0[/tex]

Not at all. Reread gabbagabbahey's post and pay attention this time. You know what erf(0) is.
 
  • #22
[tex]C_0 = \frac{ \pi}{4}[/tex]
 
  • #23
So I conclude that:

[tex] \int_{0}^{\pi/4} \exp \left(-\frac{1}{ \cos^2x}\right)\mbox{d}x = \frac{ \pi}{4} ( \mbox{-erf(1)^2+1} ) [/tex]
 
Last edited:
  • #24
Sure. I did a numerical integration and I got 0.22765187804641. Does that agree with your result?
 
  • #25
Dick said:
Sure. I did a numerical integration and I got 0.22765187804641. Does that agree with your result?

It agrees :approve:
 
  • #26
But I wonder Dick how did you actually find this way of solving this particular integral? I know the "differentiation under the integral sign" trick but as you've found out those tan and sec made it hard to see if it's actually working so I immediately went looking for another way (and failed...).
 
  • #27
You solve it by solving it. Gotta admit, I do cheat a bit. I messed around a bit with parametrizing it. Settled on exp(-a*sec(x)^2) as the most plausible. Then I used Maxima (a free computer algebra system) to try and integrate the results. It popped out really fast. Then I had to go back and figure out how Maxima arrived at the results it did. That was the hard part. Then I explained to to you. There. You know my trade secrets.
 

What is an integral?

An integral is a mathematical concept that represents the area under a curve in a graph. It is used to calculate the accumulation of a quantity over a given interval.

What is a challenging integral?

A challenging integral is an integral that is difficult to solve using traditional methods. It may involve complex functions or require advanced techniques to evaluate.

Why is the integral e^(-1/cos^2x) from 0 to pi/4 considered challenging?

This integral is considered challenging because it involves the exponential function and the trigonometric function cosine, which can be difficult to integrate. Additionally, the limits of integration, 0 and pi/4, make the integral more complex to solve.

What are some strategies for solving this challenging integral?

Some strategies for solving this integral include using trigonometric identities, substitution, and integration by parts. It may also be helpful to break the integral into smaller, more manageable parts.

Why is it important to be able to solve challenging integrals?

Being able to solve challenging integrals is important for advancing mathematical knowledge and solving real-world problems in fields such as physics, engineering, and economics. It also helps to develop critical thinking and problem-solving skills.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
947
  • Calculus and Beyond Homework Help
Replies
3
Views
236
  • Calculus and Beyond Homework Help
Replies
9
Views
744
  • Calculus and Beyond Homework Help
Replies
3
Views
544
  • Calculus and Beyond Homework Help
2
Replies
47
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
866
  • Calculus and Beyond Homework Help
Replies
6
Views
854
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
688
  • Calculus and Beyond Homework Help
Replies
4
Views
952
Back
Top