DOUBT in numerical integration

  • Thread starter bhartish
  • Start date
  • #1
26
0
I have doubt in MATLAB

How to integrate

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

The warning msg it is displaying is :

EXPLICIT integral could not be found
 

Answers and Replies

  • #2
360
1
Are you trying to do numerical or symbolic integration? Maybe that's a function which has no analytic integral? If numerical, what are the limits?
 
  • #3
26
0
I have an expression involving seven parameters. I need to first integrate the entire expression from 0 to t and then get the values by substitution method. Matlab is not supporting symbolic integration. hence I am planning to Numerical .
 
  • #4
360
1
Oops I didn't see the title of you message. In that case there must be something wrong with your Matlab code since it should be able to integrate anything it can evaluate. Could you paste the code, including the limits of the integration?

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
 
  • #6
MATLABdude
Science Advisor
1,655
4
If you're using undefined a, b, c, r, q, and l, that's not numerical integration (especially if you're also attempting to integrate to an undefined 't').
 
  • #7
26
0
I have all the values of a, b, c, r, q, l and t. Then how to go about it ?
 
  • #8
MATLABdude
Science Advisor
1,655
4
Write a small script to do so. For instance, the following uses the trapezoid rule to find the integral between 0 and pi of the sine function.

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 [code ][/ code] tags (no spaces in the tags).
 
  • #9
26
0
I will get back to you sir.
 
  • #10
26
0
I will clear one doubt. rt is r*t only. rt is definitely not a single variable.

I have one doubt cant we take some fictitous value and start integration of error function and exponential ?
 
  • #11
MATLABdude
Science Advisor
1,655
4
I will clear one doubt. rt is r*t only. rt is definitely not a single variable.

I have one doubt cant we take some fictitous value and start integration of error function and exponential ?
It's your work--you can put in whatever you want!
 

Related Threads on DOUBT in numerical integration

Replies
2
Views
6K
  • Last Post
Replies
1
Views
720
  • Last Post
Replies
3
Views
2K
Replies
8
Views
2K
Replies
1
Views
6K
Replies
16
Views
733
Replies
27
Views
2K
  • Last Post
Replies
3
Views
990
  • Last Post
Replies
4
Views
853
  • Last Post
Replies
3
Views
27K
Top