Solving for an mathematical expression under certain parametric conditions

1 vue (au cours des 30 derniers jours)
Subhajit Bej
Subhajit Bej le 5 Mai 2020
Hello,
How do I solve a mathematical expression for certain conditions?
For example, how do I solve for A or FIE in the limit x<<eps2?
Please, find attached my code.
syms n0 ns eps2 x
% ne=n0*Sin[theta0];
% n0=1;
% ns=1.5;
neu=ns*n0^(-1);
thetac=asind(neu);%critical angle
thetab=atand(neu);%Brewster's angle
thetaqb=acosd(((neu^2-1)*sqrt(neu^2+1))*(neu^4+1)^(-1));%Pseudo-Brewster angle
theta0=thetaqb;%The critical angle of 41.8 degrees,...
%the quasi-Brewster angle of 69.2 degrees,...
%and the pseudo-Brewster angle of 84.8 degrees.
ne=n0*sind(theta0);
% thetas=ArcSin[ne/ns];
thetas=asind(ne*ns^(-1));
% Z0=n0/Cos[theta0];
Z0=n0*cosd(theta0)^(-1);
% Zs=ns/Cos[thetas];
Zs=ns*cosd(thetas);
% n2=ne^2-I*eps2;
% eps2=;
n2=ne^2-1i*eps2;
% m11=1+(n2*(x^2))/2;
% x=;
m11=1+(n2*x^2)*0.5;
% m12=x*n2/eps2;
m12=x*n2*eps2^(-1);
% m21=x*eps2;
m21=x*eps2;
% m22=m11;
m22=m11;
% dnm=(m11+m12*Zs)*Z0+(m21+m22*Zs);
dnm=(m11+m12*Zs)*Z0+(m21+m22*Zs);
% r=((m11+m12*Zs)*Z0-(m21+m22*Zs))/dnm;
r=((m11+m12*Zs)*Z0-(m21+m22*Zs))*dnm^(-1);
% t=2*Z0/dnm;
t=2*Z0*dnm^(-1);
% R=Abs[r]^2;
R=abs(r)^2;
% T=Re[Zs]/Z0*(Abs[t]^2);
T=real(Zs)*(Z0*abs(t)^2)^(-1);
% A=1-T-R;
A=1-(T+R);
% FIE=n0*A*Cos[theta0]/eps2/x;
FIE=(n0*A*cosd(theta0))*(eps2*x)^(-1);

Réponses (1)

Guru Mohanty
Guru Mohanty le 8 Mai 2020
Hi, I understand you want to solve a equation under some parametric condition. To set some parametric condition you can use assume function. Here is a sample code using assume function.
syms x y
assume(x>y)
expr1 = 2*x-3*y==0;
expr2 = x + y ==2;
expr = [expr1;expr2];
solve(expr)
  1 commentaire
Walter Roberson
Walter Roberson le 8 Mai 2020
Note: solve() does not always pay attention to assumptions. When you get a result from solve() it is always a good idea to check that it really does pass all of the requirements.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Physics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by