|
From: | Afsshl |
Subject: | Re: Double integration results in "error: quad: invalid recursive call" |
Date: | Thu, 24 Feb 2005 01:46:11 EST |
according the method you use in colloc() in last email, I change my variable x, y to rsin(theta), rcos(theta), it indeed make problem become 2 independent variable if I chose to integrate on a circle (area not perimeter) radius 3, so f= 9x^2 -3z
---------------------------------------------------
octave:1> function z=f(x,y)
> z= (9* x^2 * (sin(y)^2) - 3 * x * cos(y)) * x; > endfunction octave:2> n=1; [r,A,B,q]=colloc(n); r*=3; r+=0; q*=2*pi; q'*f(r,r')*q ans = 1174.3 octave:3> -----------------------------------------------------------
but that is not the answer, which should be 572.555
any comment?
eric
|
[Prev in Thread] | Current Thread | [Next in Thread] |