Triple integral with absolute value limits

4 vues (au cours des 30 derniers jours)
mohammed saleh
mohammed saleh le 4 Déc 2022
I would like to solve the following integral numerically:
I wrote this code, but the result is not coming. Can anyone tell me what my mistake is?
lambda1=25/(1000)^2;
lambda1=100/(1000)^2
lambda1 = 1.0000e-04
fun =integral3(@(l0,l2,l1) (l1.^-3).*exp(-pi*(lambda2.*l2.^(2)+lambda1.*l0.^(2)))./(sqrt(1-((l0.^(2)+l2.^(2)-l1.^(2))/(2*l0.*l2)).^2)),0,Inf,0,@(l0,l2) abs(l0-l2),@(l0,l2) (l0+l2))
Error using integral3
Invalid argument list. Function requires 1 more input(s).

Réponse acceptée

Walter Roberson
Walter Roberson le 4 Déc 2022
lambda1=25/(1000)^2;
lambda2=100/(1000)^2
lambda2 = 1.0000e-04
fun =integral3(@(l0,l2,l1) (l1.^-3).*exp(-pi*(lambda2.*l2.^(2)+lambda1.*l0.^(2)))./(sqrt(1-((l0.^(2)+l2.^(2)-l1.^(2))/(2*l0.*l2)).^2)),0,Inf,0,Inf,@(l0,l2) abs(l0-l2),@(l0,l2) (l0+l2))
Warning: Inf or NaN value encountered.
Warning: The integration was unsuccessful.
fun = NaN
  14 commentaires
mohammed saleh
mohammed saleh le 9 Sep 2023
Modifié(e) : mohammed saleh le 9 Sep 2023
SORRY fun=fun2
its mistake
fun =@(l1,l2,l0) ((l1.^(1-4)).*(exp(-pi*(lambda_2*l2.^2+lambda_1*l0.^2))./(sqrt(1-((l0.^2+l2.^2-l1.^2)./(2*l0.*l2)).^2))));
const=4*pi*lambda_2*lambda_1;
z=const*integral3(fun,0,inf,0,inf,@(l0,l2) 1+eps*(l0-l2),@(l0,l2) 1-eps*(l0+l2));
I got it, but there are big differences with the simulation result.
if iw ant to change like this
z=@(l2) const*integral2(@(l0,l1) fun,0,inf,@(l0,l2) 1+eps*(l0-l2),@(l0,l2) 1-eps*(l0+l2)); its possible ?
i want z as functions of l2.
mohammed saleh
mohammed saleh le 9 Sep 2023
i did like that but get error Not enough input arguments.
fun =@(l0,l2,l1) ((l1.^(1-4)).*(exp(-pi*(lambda_2*l2.^2+lambda_1*l0.^2))./(sqrt(1-((l0.^2+l2.^2-l1.^2)./(2*l0.*l2)).^2))));
z = @(l2) integral2(@(l0, l1) fun(l0,l2,l1), 0,inf, @(l0,l2) 1+eps*(l0-l2),@(l0,l2) 1-eps*(l0+l2));

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by