Numerical integration

View: New views
3 Messages — Rating Filter:   Alert me  

Numerical integration

by Marcin Sleczka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Unfortunately I've got another problem with integration. Even Toolbox for numerical integration did not help.
I have to integrate such a thing:
\int_a^b dt \exp[\int_t^b dx f(x)]
I don't have idea haw can I do it. Every help will by useful.

Thanks!

Parent Message unknown Re: Numerical integration

by Marco Caliari-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

Try

octave:1> a=0;
octave:2> b=1;
octave:3> g=@(t,b)exp(quadl(@sin,t,b));
octave:4> quad(@(t)g(t,b),a,b)
ans =  1.3641

Cheers,

Marco
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: Numerical integration

by Marcin Sleczka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Marcin Sleczka wrote:
Hi,
Unfortunately I've got another problem with integration. Even Toolbox for numerical integration did not help.
I have to integrate such a thing:
\int_a^b dt \exp[\int_t^b dx f(x)]
I don't have idea haw can I do it. Every help will by useful.

Thanks!
It can be done with use quadl and quad but it's very time consuming. In fact f(x) has the form
f(x)=exp[-x^2*g^2]*sin(\omega*t+\varphi)
I know that integral \int f(x) dx can be expressed by erf function but I would like to perform numerical integration.

Any idea how can I do it in different way?