Integral of squared error function

In summary, Ragib is trying to solve an equation involving a nonlinear function, and is having trouble getting an analytical solution. He has tried integrating by parts, but is not able to get the correct result for the integral involving the squared error function. He has attempted to solve the equation using differential calculus, but is still having difficulty. He asks for help, and is hopeful that someone can give him a solution.
  • #1
singhofmpl
15
0
Does anybody knows how to solve the following equation?
[tex]\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx[/tex]

Please help.

regards
singhofmpl
 
Physics news on Phys.org
  • #2
Policy is that you must show us working before we can provide substantial help. If we don't know what you have done we done know where you got stuck. The hints I'll give you this time are: Trying integrating by parts to reduce the exponent of the error function in the integral. You can find the derivative of the error function by the Fundamental Theorem of Calculus.
 
  • #3
Gib Z said:
Policy is that you must show us working before we can provide substantial help. If we don't know what you have done we done know where you got stuck. The hints I'll give you this time are: Trying integrating by parts to reduce the exponent of the error function in the integral. You can find the derivative of the error function by the Fundamental Theorem of Calculus.

Dear Sir
Your suggestion is very much correct as far as applying by parts is concerned but I'm able to get analytical results only if the integral involves only one power of the error function i.e

[tex]\int_{0}^{\infty}\mbox{erf}(\sqrt{x})\exp(-x)dx[/tex] but I'm not able to get the correcr results for the integral [tex]\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx[/tex]. If I apply by parts to the integral involving squared error function then after a long derivation finally I'm getting 0, which I' m suspicious that this solution is correct.
 
  • #4
The answer is not zero as the integrand is strictly positive on the interval of integration. Please show me the steps you did. From the start: To reduce the power of [tex]Erf^2\sqrt{x} [/tex] in your integral, use integration by parts, letting [tex]u= \Erf^2 \sqrt{x}, dv = e^{-x} dx[/tex]. To find du, use the definition of the Error function and the Fundamental Theorem of Calculus.

After you carry that out, you should have an integral like : [tex]\int^{\infty}_0 Erf (\sqrt{x}) e^{-2x} dx[/tex]

So exp (-2x), not just exp (-x).

You can't finish there. You have to apply integration by parts again in a similar fashion, then continue from there.
 
Last edited:
  • #5
Respected Sir
I'm sorry to say bet still there is problem. Please see my workings given below:
[tex]\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx[/tex]
let [tex]u=\mbox{erf}^2(\sqrt{x})[/tex]
Now [tex]du=\frac{2\mbox{erf}(\sqrt{x})\exp(-x)}{\sqrt{\pi}\sqrt{x}}dx[/tex]

Now it is required to write [tex]\exp(-x)dx[/tex] in terms of [tex]du[/tex]. So
[tex]\exp(-x)dx=\frac{\sqrt{\pi}\sqrt{x}}{2\mbox{erf}(\sqrt{x})}du[/tex]
which further can be written as:
[tex]\exp(-x)dx=\frac{\sqrt{\pi}\sqrt{x}}{2\sqrt{u}}du[/tex]
but the problem is how to write [tex]\sqrt{x}[/tex] in terms of u?

Please help
 
  • #7
Dear Sir
Thanks a lot for your prompt response. I'm really very sorry for bothering you so much. Finally I got the solution following your advice. The final answer which I'm getting is given below:

[tex]\frac{2\sqrt{2}\arctan(\frac{1}{\sqrt{2}})}{\pi}[/tex]

Please let me know whether my answer is correct.
 
  • #8
That is correct. Don't worry about asking questions, It wasn't a bother at all.
 
Last edited:
  • #9
Dear Sir
May I know your affiliation (if you don't mind) so that I can mention it while writing my report or paper?
 
  • #10
My name is Ragib Zaman, and I am a first year student at the University of Sydney, Australia. I am studying the Bachelor of Science (Advanced Mathematics) degree.
 
  • #11
Integral due to non-linearity of PA

Hi Ragib
While modeling the non-linear behavior of power amplifier (PA), I came to an integral of the form given below; I'm not able to figure out how to solve it.

[tex]I=\frac{A^2}{2\sigma_x^4}\int_{0}^{\infty}\frac{r^3}{r^2+A^2}\exp(\frac{j\pi}{3}\frac{r^2}{r^2+A^2}-\frac{r^2}{2\sigma_x^2})dr[/tex]

Please help me to solve it analytically.
 
  • #12
After some initial manipulations I've managed to make it look like

[tex]ke^k \int^{\infty}_k \left(1-\frac{k}{t}\right) \frac{e^{\frac{i\pi}{3}\left(1-\frac{k}{t}\right)}}{e^t} dt[/tex]

where [tex] k = \frac{A^2}{2\sigma_x^2}[/tex]

I'm still working on reducing that further, but in the mean time you could give that form a try.
 
  • #13
Dear Sir
kindly suggest me how find the integration of :

[tex]\int_{0}^{\infty}\mbox{erf}(\sqrt{x})\exp(-x)dx[/tex]
 
  • #14
Hi, may I know how do you solve for [tex] \int_{0}^{\infty}\mbox{erf}(\sqrt{x})\exp(-x)dx [/tex]?

Could you detail the assignment of 'u' in each iteration of integration, and how do you get the eventual term in arctan?

Could you give me some hints on solving that because it seems to me that the integrations would loop infinitely.

I dearly need your advice. Thanks.
 
  • #15
It's not very hard, I'm certain you can do it if you try. Integration by parts with [itex] u = erf( \sqrt{x} ), dv = e^{-x} dx [/itex]. To find du, use the fundamental theorem of calculus and the chain rule.
 
Last edited:
  • #16
Regarding the original problem:
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx
[/tex]

here is what I've got so far.
[tex]
u=\mbox{erf}^2(\sqrt{x}),
[/tex]
[tex]
du=\frac{2\mbox{erf}(\sqrt{x})\exp(-x)}{\sqrt{\pi}\sqrt{x}}dx,
[/tex]
[tex]
dv = \exp(-x) dx,
[/tex]
[tex]
v=-\exp(-x).
[/tex]

Thus, we have
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx = -\exp(-x)\mbox{erf}^2(\sqrt{x}) + \int_{0}^{\infty}\frac{2\mbox{erf}(\sqrt{x})\exp(-2x)}{\sqrt{\pi}\sqrt{x}}dx.
[/tex]

Now suppose that I do another integration by parts with
[tex]
u=\mbox{erf}(\sqrt{x}),
[/tex]
[tex]
du=\frac{\exp(-x)}{\sqrt{\pi}\sqrt{x}}dx,
[/tex]
[tex]
dv = \frac{\exp(-2x)}{\sqrt{x}} dx,
[/tex]
[tex]
v=\frac{\sqrt{\pi}\mbox{erf}(\sqrt{2x})}{\sqrt{2}}.
[/tex]

The resultant expression becomes
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx = -\exp(-x)\mbox{erf}^2(\sqrt{x}) + \sqrt{2}\mbox{erf}(\sqrt{x})\mbox{erf}(\sqrt{2x}) - \frac{2\sqrt{2}}{\sqrt{\pi}}\int_{0}^{\infty}\frac{\mbox{erf}(\sqrt{2x})\exp(-x)}{\sqrt{x}}dx.
[/tex]

and I'm stuck at this point where the form of [tex]\frac{\exp(x)\mbox{erf}(x)}{x}[/tex] in the integration cannot be suppressed.

I have tried to proceed with another round of integration and a similar form returns. Please kindly point me out my mistake(s). Thanks.
 
Last edited:
  • #17
meng said:
Hi, may I know how do you solve for [tex] \int_{0}^{\infty}\mbox{erf}(\sqrt{x})\exp(-x)dx [/tex]?

Could you detail the assignment of 'u' in each iteration of integration, and how do you get the eventual term in arctan?

Could you give me some hints on solving that because it seems to me that the integrations would loop infinitely.

I dearly need your advice. Thanks.

Sorry about the very late reply meng, I don't come on physicsforums very often anymore because of my studies. To others reading, I'm reviving this thread because I got a PM which stated this problem was in their research, so I thought I should help.

Here you go meng:

[tex] I = \int^{\infty}_0 \mbox{erf}(\sqrt{x}) e^{-x} dx [/tex]

Integrate by parts, letting [itex] u = \mbox{erf} \sqrt{x} , du = \frac{1}{2\sqrt{x}} \cdot \frac{2}{\sqrt{\pi}} e^{-x} dx [/itex] and [itex] dv = e^{-x} dx, v = - e^{-x} [/itex], where we found the derivative of u by the fundamental theorem of calculus.

This gives:
[tex] I = \left[ -\mbox{erf}\sqrt{x} e^{-x} \right]^{\infty}_0 + \int^{\infty}_0 \frac{ e^{-2x} }{ \sqrt{\pi x} } dx [/tex].

For the 1st term, as x goes to infinity, the erf term goes to a constant since [itex] \int^{\infty}_0 e^{-x^2} dx = \sqrt{\pi}/2 [/itex] while the exp goes to zero, so that's zero. And when x=0, the erf term is 0 while the exp term is 1, so zero as well. So we just have the integral remaining, in which we let [itex] u = \sqrt{x} [/itex] which leaves us with

[tex] I = \frac{2}{\sqrt{\pi}} \int^{\infty}_0 e^{-2u^2} du [/tex].

Let [itex] t = \sqrt{2} u [/itex],

[tex] I = \frac{ \sqrt{2}}{\sqrt{\pi}} \int^{\infty}_0 e^{-t^2} dt = \frac{1}{\sqrt{2}} [/tex]
 
  • #18
meng said:
Regarding the original problem:
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx
[/tex]

here is what I've got so far.
[tex]
u=\mbox{erf}^2(\sqrt{x}),
[/tex]
[tex]
du=\frac{2\mbox{erf}(\sqrt{x})\exp(-x)}{\sqrt{\pi}\sqrt{x}}dx,
[/tex]
[tex]
dv = \exp(-x) dx,
[/tex]
[tex]
v=-\exp(-x).
[/tex]

Thus, we have
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx = -\exp(-x)\mbox{erf}^2(\sqrt{x}) + \int_{0}^{\infty}\frac{2\mbox{erf}(\sqrt{x})\exp(-2x)}{\sqrt{\pi}\sqrt{x}}dx.
[/tex]

Now suppose that I do another integration by parts with
[tex]
u=\mbox{erf}(\sqrt{x}),
[/tex]
[tex]
du=\frac{\exp(-x)}{\sqrt{\pi}\sqrt{x}}dx,
[/tex]
[tex]
dv = \frac{\exp(-2x)}{\sqrt{x}} dx,
[/tex]
[tex]
v=\frac{\sqrt{\pi}\mbox{erf}(\sqrt{2x})}{\sqrt{2}}.
[/tex]

The resultant expression becomes
[tex]
\int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx = -\exp(-x)\mbox{erf}^2(\sqrt{x}) + \sqrt{2}\mbox{erf}(\sqrt{x})\mbox{erf}(\sqrt{2x}) - \frac{2\sqrt{2}}{\sqrt{\pi}}\int_{0}^{\infty}\frac{\mbox{erf}(\sqrt{2x})\exp(-x)}{\sqrt{x}}dx.
[/tex]

and I'm stuck at this point where the form of [tex]\frac{\exp(x)\mbox{erf}(x)}{x}[/tex] in the integration cannot be suppressed.

I have tried to proceed with another round of integration and a similar form returns. Please kindly point me out my mistake(s). Thanks.

Here's a very late reply. I find it a little easier to change variables so that the error function doesn't have the square root:
[tex]
y^2 = x
[/tex]
[tex]
I = \int_{0}^{\infty}\mbox{erf}^2(\sqrt{x})\exp(-x)dx = 2 \int_0^\infty dy~\mbox{erf}^2(y) \exp(-y^2) y dy
[/tex]
Now integrate by parts like you did, the surface term is zero
[tex]
I = \frac{4}{\sqrt{\pi}} \int_0^\infty dy ~\mbox{erf}(y) \exp(-2y^2)
[/tex]
At this point substitute the definition of the error function but with a change of variables so that the integration limits are constant
[tex]
\mbox{erf}(y) = \frac{2}{\sqrt{\pi}}\int_0^1 d\alpha ~e^{-\alpha^2 y^2} y
[/tex]
You can then change the order of integration
[tex]
I = \frac{8}{\pi} \int_0^1 d\alpha \int_0^\infty dy ~ y \exp[-(2+\alpha^2)y^2]
= \frac{4}{\pi} \int_0^1 d\alpha ~\frac{1}{2+\alpha^2}
=\frac{2\sqrt{2}}{\pi} \tan^{-1}\frac{1}{\sqrt{2}}
[/tex]
 

1. What is the Integral of Squared Error Function?

The integral of squared error function is a mathematical concept used in statistics and signal processing to measure the difference between actual and predicted values. It is also known as mean squared error or MSE.

2. How is the Integral of Squared Error Function calculated?

The integral of squared error function is calculated by taking the sum of the squared differences between the actual and predicted values, divided by the number of observations. The result is then integrated over the range of the data points.

3. What is the significance of the Integral of Squared Error Function in data analysis?

The Integral of squared error function is important in data analysis as it provides a quantitative measure of how well a model fits the data. It is commonly used to evaluate the performance of regression models and to compare different models.

4. What is the relationship between the Integral of Squared Error Function and the standard deviation?

The Integral of squared error function is related to the standard deviation by the square root of the integral. This means that a smaller integral value indicates a smaller standard deviation and thus, a better fit of the model to the data.

5. How can the Integral of Squared Error Function be minimized?

The Integral of squared error function can be minimized by adjusting the parameters of the model to find the best fit for the data. This process is known as optimization and is commonly used in machine learning and data analysis to improve the accuracy of models.

Similar threads

Replies
4
Views
1K
Replies
1
Views
909
Replies
31
Views
896
Replies
3
Views
1K
Replies
3
Views
195
Replies
2
Views
265
Replies
4
Views
323
Replies
12
Views
1K
Replies
12
Views
1K
Replies
20
Views
2K
Back
Top