Prev: check for existence of user define object in array
Next: An exact simplification challenge - 102 (Psi, polylog)
From: Paul on 4 Aug 2010 20:51 Hello. I want to find value of integral from 0 to 1 exp(t*sin(x))*dx with function int I can find integral from 0 to 1 exp(sin(x))*dx But if I add independent variable t, than I receive an error from function int() How can I evaluate that integral? Thank you.
From: Walter Roberson on 4 Aug 2010 21:55 Paul wrote: > I want to find value of integral from 0 to 1 exp(t*sin(x))*dx > with function int I can find integral from 0 to 1 exp(sin(x))*dx > But if I add independent variable t, than I receive an error from > function int() > > How can I evaluate that integral? My speculation would be that you are not telling int() which variable to integrate over. Show us how you are calling int() and any critical code leading up to that.
From: Paul on 5 Aug 2010 03:04 Walter Roberson <roberson(a)hushmail.com> wrote in message <wSo6o.57866$YX3.28517(a)newsfe18.iad>... > Paul wrote: > > > I want to find value of integral from 0 to 1 exp(t*sin(x))*dx > > with function int I can find integral from 0 to 1 exp(sin(x))*dx > > But if I add independent variable t, than I receive an error from > > function int() > > > > How can I evaluate that integral? > > My speculation would be that you are not telling int() which variable to > integrate over. > > Show us how you are calling int() and any critical code leading up to that. syms x t; int(exp(-t*sin(x)),x,0,1)
From: Rogelio on 5 Aug 2010 04:44 "Paul " <unicybsatr(a)gmail.com> wrote in message <i3dnp8$5gg$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <wSo6o.57866$YX3.28517(a)newsfe18.iad>... > > Paul wrote: > > > > > I want to find value of integral from 0 to 1 exp(t*sin(x))*dx > > > with function int I can find integral from 0 to 1 exp(sin(x))*dx > > > But if I add independent variable t, than I receive an error from > > > function int() > > > > > > How can I evaluate that integral? > > > > My speculation would be that you are not telling int() which variable to > > integrate over. > > > > Show us how you are calling int() and any critical code leading up to that. > syms x t; > int(exp(-t*sin(x)),x,0,1) Hi Paul, As I understand what you want is a numerical integration. If what you want is that then you should use the function "quad" (or similars). I am assuming that "t" in your funcion is not a variable. t=10; f=@(x)exp(-t*sin(x)); quad(f,0,1) ans= 0.1011
From: us on 5 Aug 2010 05:07 On Aug 5, 9:04 am, "Paul " <unicybs...(a)gmail.com> wrote: > Walter Roberson <rober...(a)hushmail.com> wrote in message <wSo6o.57866$YX3..28...(a)newsfe18.iad>... > > Paul wrote: > > > > I want to find value of integral from 0 to 1 exp(t*sin(x))*dx > > > with function int I can find integral from 0 to 1 exp(sin(x))*dx > > > But if I add independent variable t, than I receive an error from > > > function int() > > > > How can I evaluate that integral? > > > My speculation would be that you are not telling int() which variable to > > integrate over. > > > Show us how you are calling int() and any critical code leading up to that. > > syms x t; > int(exp(-t*sin(x)),x,0,1) well... these work (r2010a)... which error(s) do you receive(?)... syms x t; int(exp(-t*sin(x)),x,0,1) % Warning: Explicit integral could not be found. % ans = int(1/exp(t*sin(x)), x = 0..1) int(exp(-t*sin(x)),t,0,1) % ans = -(1/exp(sin(x)) - 1)/sin(x) us
|
Next
|
Last
Pages: 1 2 3 Prev: check for existence of user define object in array Next: An exact simplification challenge - 102 (Psi, polylog) |