- #1

- 26

- 0

How to integrate

exp(x)*erfc(x) ? in MATLAB

The warning msg it is displaying is :

EXPLICIT integral could not be found

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter bhartish
- Start date

In summary, you may be able to numerically integrate the error function and exponential, but it's not guaranteed and you should be careful to check for errors.

- #1

- 26

- 0

How to integrate

exp(x)*erfc(x) ? in MATLAB

The warning msg it is displaying is :

EXPLICIT integral could not be found

Physics news on Phys.org

- #2

- 360

- 1

- #3

- 26

- 0

- #4

- 360

- 1

Seems like a function that can easily be numerically integrated over any range of x.

Does it actually produce a solution, but you don't trust it because of the warning message?

- #5

- 26

- 0

e^(a+bt) erfc(-c+rt)exp((t-q)/l)

within the limits o to t

within the limits o to t

- #6

Science Advisor

- 1,663

- 6

- #7

- 26

- 0

I have all the values of a, b, c, r, q, l and t. Then how to go about it ?

- #8

Science Advisor

- 1,663

- 6

Code:

```
t=0:pi/100:pi; % t values
y=sin(1*t); % calculation of function at all t
A = trapz(y,t); % implements trapezoid rule
```

Why did I explicitly use 1*t? While I could have just used t, it's to illustrate that there is no implicit multiplication in MATLAB (i.e. rt refers to the value / vector / matrix rt, while r*t refers to the product of r and t). I'd suggest writing up a small function (just as I've done above) in Notepad / Text Editor / EMacs / Vi, and then paste it here between the

- #9

- 26

- 0

I will get back to you sir.

- #10

- 26

- 0

I have one doubt can't we take some fictitous value and start integration of error function and exponential ?

- #11

Science Advisor

- 1,663

- 6

bhartish said:

I have one doubt can't we take some fictitous value and start integration of error function and exponential ?

It's your work--you can put in whatever you want!

Numerical integration is a method used to approximate the value of a definite integral, which is the area under a curve. It is important in scientific research because many real-world problems involve complex functions that cannot be solved analytically, and numerical integration provides a way to calculate these values with a high degree of accuracy.

Analytical integration involves finding the exact solution to a definite integral using mathematical formulas and techniques, while numerical integration uses algorithms and numerical methods to approximate the solution. Analytical integration is only possible for a limited set of functions, while numerical integration can be applied to a wider range of functions.

The accuracy of the results depends on the complexity of the function being integrated and the choice of numerical integration method. Some methods, such as the trapezoidal rule, are less accurate but easier to implement, while others, like Simpson's rule, are more accurate but require more computational resources. It is important to choose a method that is suitable for the specific problem at hand.

Numerical integration can be used for any function that can be evaluated at a given point. However, the accuracy of the results may vary depending on the type and complexity of the function. Some functions, such as those with sharp corners or discontinuities, may require special methods or adaptations to be integrated accurately.

The reliability of the results can be assessed by comparing them to the exact or known solution, when available. Additionally, the convergence of the results can be checked by increasing the number of intervals or iterations in the numerical integration method. If the results remain stable and approach the known solution, then they can be considered reliable.

Share:

Mathematica
Numerical integration over a Green's function

- Replies
- 13

- Views
- 1K

- Replies
- 1

- Views
- 73

Mathematica
Numerical Integration error

- Replies
- 16

- Views
- 1K

- Replies
- 27

- Views
- 2K

MATLAB
Double Numerical Integration

- Replies
- 3

- Views
- 2K

- Replies
- 5

- Views
- 1K

- Replies
- 7

- Views
- 1K

- Replies
- 2

- Views
- 1K

- Replies
- 8

- Views
- 3K

- Replies
- 5

- Views
- 984