Here is the code that I am trying to run:
syms z_1 z_2 m_1 m_2 x y Q p s t
m_1=0.01;
m_2=249;
x=5;
y=5;
Q=0.6;
p=0.5;
s=0.04;
t=0.25;
func=(62001*sinh(y/100 - z_2/100))/(100*cosh((249*cos(2*pi*(z_1 - x + 1/4)))/2 +249))-(249*sinh(249*y - 249*z_2))/(10000*(cosh((249*cos(2*pi*(z_1 - x + 1/4)))/2 + 249) - 620009999/10000));
hunc=(m_1*m_2*(Q+p*cos(2*pi*(x-z_1-t))))/(m_2^3*tanh(m_1*(1+p*cos(2*pi*(x-z_1-t))))-m_1^3*tanh(m_2*(1+p*cos(2*pi*(x-z_1-t))))-(1+p*cos(2*pi*(x-z_1-t))*m_1*m_2*(m_2^2-m_1^2)));
lunc=3/(2*pi*s^2*t^3)*exp(-(3*z_1^2/(2*s^2*t^3))+(3*z_2^2/(2*s^2*t^3)));
F=func*hunc*lunc;
integral2(F,-inf,inf,-inf,inf)
I am getting that the error that
Integrand is invalid
in MATLAB console. Though the integrand is long, I hope it has all the correct symbols. As a side, I put the same function and integrated it in SageMath, but I got an answer very close to zero. What exactly is wrong in the integrand or method? Any hints? Thanks beforehand.
F
isn't a function handle, which is correct (you don't actually give any hint towards what are the integration variables here). It also expects this to be numerically evaluated, not symbolically. It seems unclear what you actually want here. $\endgroup$@(z_1,z_2) F
and deletingsyms
and the variables after it. Still getting error. The errors are numerous,ScalarValued
,Vadapt
errors are just two of the several errors I am getting. $\endgroup$