tags:

views:

37

answers:

1

@ problems.

1)

%Main Function
%This Main Function reads Integral, Lower and Upper Limits of Integration
%Outputs of Main Function are approximation of the integral, error estimate
%and Actual Error
ipstring=input('Function String: ','s'); %Read Integral string
display('Enter Limits of Integration');
a=input('Lower Limit: '); %Read Lower Limit
b=input('Upper Limit: '); %Read Upper Limit

%passing Integral String and Limits to user defined function.
format('long');
[Approximation,Error_Estimate,Actual_error]=Gauss_rout_new(ipstring,a,b)

works well for the function '4/(x^2+1)' with limits 0 and 1

warning explicit integral could not be found for exp(x^-1*exp(x^-2*a^-2- x*c)) 

even if I put values of a and c. c is combination of other consts.

+1  A: 

I'm not familiar with Gauss_rout_new, but I imagine it tries to interpret the function symbolically and integrate it symbolically as well, which is probably what it means by 'explicit integral'.

Are you sure the function you are trying to integrate (exp(x^-1*exp(x^-2*a^-2- x*c))) has an explicit integral? That seems like quite a nasty function...

Nathan Fellman
I wrote Gauss_rout_new myself and it works wells for 4/(x^2+1) or sin(x)/x etc. And I have to integrate expressions like (x*exp-(x^-2*a^-2 - x * c)). I have values of a and c. I do not understand what explicit integral means and how to solve that.
Sudeep
Do you have any indication what line inside `Gauss_rout_new` is throwing the error?
Nathan Fellman
try setting `dbstop on warning` to start the debugger on the relevant line.
Nathan Fellman

related questions