>From mailnull Wed May 1 20:05:01 2013
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of math.utexas.edu designates 146.6.25.7 as permitted sender) client-ip=146.6.25.7; envelope-from=maxima-bounces at math.utexas.edu; helo=ironclad.mail.utexas.edu;
Date: Wed, 1 May 2013 15:03:38 -0500
From: Ben Blomberg <bblomberg at mail.bradley.edu>
Content-Type: multipart/mixed;
boundary="===============8499527763016679228=="
--===============8499527763016679228==
Content-Type: multipart/alternative; boundary="bcaec52e5c2d1599c804dbad9dcc"
--bcaec52e5c2d1599c804dbad9dcc
Content-Type: text/plain; charset="ISO-8859-1"
Hello All,
I am trying to use the quad_qags function to evaluate the following with
respect to x:
P0:(quad_qags(v[1,1]*exp((-%i)*(10)*phi/(0.00197))*x,x,-0.63,0.63));
phi is a variable i have in there for plotting purposes later on in the
code.
And v is calculated from the following sum:
for n:1 thru 11 do for j:1 thru 21 do
v[n,j]:1/sqrt(0.63)*(sum(vectors[n,j][m+11]*exp(%i*2*%pi*m*x/.63),m,-10,10));
vectors is a list with values between 1*10^-6 and 1*10^-7.
When I try this I do not get the result with the list of the four
elements. Instead I get a list of values that still contain x followed by
the parameters esprel, epsabs and limit. I do not receive an error message
but no value either. I tried this with quad_qag as well and had the same
problem.
Any thoughts on how to get a value?
Thanks!
Ben
Ben, the integrate command is quite capable of integrating P0
symbolically. So, you could do something like
define(P(phi,a,b), integrate(...,x,a,b));
where ... is your integrand above and your domain of integration is
the interval [a,b].
plot2d(P(phi,-0.63,0.63),[phi,-1,1]);
will then do what you want.
Leo