How should I solve coupled differential non linear equations? Given below.
Afficher commentaires plus anciens
I want to solve equations A and B to find beta. Please help. lambda = 1.550; zmax = 2290; zmin = 300; N = 50; z = zeros(0,N); phi = zeros(0,N); r2 = 5; phimax = 50; phimin = 1; mu0 = 4*pi*10^-1; epsilon0 = 8.85*10^-6; k = 2*pi/lambda; for n = 1:N z(n)= ((n-1)*(zmax-zmin))/(N-1)+zmin; phi(n)= ((n-1)*(phimax-phimin))/(N-1)+phimin;
end
n1 = z.*(1-0.015.*exp(-r2)/1.795); h(phi) = ((sqrt(epsilon0/mu0).*(1/k).*(beta(z).*e(z)+W)));
e(phi) = -((sqrt(mu0/epsilon0).*(1./k.*n(z).^2).*(beta(z).*h(z)+V))); e(z)=-1/1i.*((sqrt(mu0/epsilon0).*(1./k.*n(z).^2).*(T-Q))); h(z)= 1/1i.*((sqrt(epsilon0/mu0).*(1/k.*z).*(U-S)));
syms z f(z)=1i.*h(z); V=diff(f,z); syms z f(z)=1i.*e(z); W=diff(f,z);
syms z f(z)=z.*h(phi); T=diff(f,z); syms z f(z)=z.*e(phi); U=diff(f,z); syms z f(z) = ln(n1(z).^2); df = diff(f,z); syms z f(z)=e(z); P=diff(f,z); syms z f(z)=h(z); Q=diff(f,phi); syms z f(z)=h(z); R=diff(f,phi); syms z f(z)=e(z); S=diff(f,phi);
A= del2(e(z))+(n1(z)^2.*k^2-beta(z)).*e(z)-(df.*(beta(z)./((n1(z)^2.*k^2-beta(z)))).*(beta(z).*P+sqrt(mu0/epsilon0).*(k./z).*R)); B = del2(h(z))+(n1(z)^2.*k^2-beta(z)).*h(z)-(df.*(beta(z)./((n1(z)^2.*k^2-beta(z)))).*(Q-(beta(z)./k.*z).*sqrt(epsilon0/mu0).*S));
2 commentaires
Star Strider
le 30 Jan 2017
If they are nonlinear, it is best to not use the Symbolic Math Toolbox, since very few nonlinear equations have analytic solutions.
Integrate them numerically with ode45 (or ode15s or whatever ODE solver is most appropriate to your functions).
chetna sharma
le 31 Jan 2017
Réponses (0)
Catégories
En savoir plus sur Numeric Solvers dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!