I wanted to solve a parametric double integral. Matlab requires me to set these parameters (for my case x0, x1, x2, x3, x4, x5, x6, x7, x8 and x9).
The variables are r and t.
Is there a solution with Matlab to solve a double integral set without setting any values of the parameters.
here is the code:
————————————
syms t r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9; tmin = 0; tmax = 1; rmin = 0; rmax = 2*pi; g = +(x0*cos(-2*t)-x5*sin(-2*t))*(1-r^(-2))+(x1*cos(-1*t) - x6*sin(-1*t))*(1-r^(-1))+(x2*cos(0*t)-x7*sin(0*t))*(1-r^(0))+(x3*cos(1*t)-x8*sin(1*t))*(1-r^(1))+(x4*cos(2*t)-x9*sin(2*t))*(1-r^(2)); h = +(x0*sin(-2*t)+x5*cos(-2*t))*(1-r^(-2))+(x1*sin(-1*t)+x6*cos(-1*t))*(1-r^(-1))+(x2*sin(0*t)+x7*cos(0*t))*(1-r^(0))+(x3*sin(1*t)+x8*cos(1*t))*(1-r^(1))+(x4*sin(2*t)+x9*cos(2*t))*(1-r^(2)); f = r*(g^2+h^2); fun = @(t,r) f; format long J = integral2(fun,tmin,tmax,rmin,rmax,'Method','iterated','AbsTol',1e-12 ,'RelTol',1e-10)
—————end——————-
thank you in advance
Best Answer