MATLAB: Solution of trigonometric equation

trigonometric equation solution

I have to find the solutions of
scale_length=(Esi*tan(pi*tox./x)-Eox*cot(pi*tsi./(2*x))) %(1)
or
(Esi*tan(pi*tox./x)=Eox*cot(pi*tsi./(2*x))
w.r.t x or sometimes I called x as lambda
so what I did I plotted this:
scale_length1=(tan(3.14*tox./x).*tan(1.57*tsi./(x)))-(3.9/11.8); %(2)
where Eox/Esi=3.9/11.8
code for do this is :
------% All Constants are in MKS-----%
E0=8.85e-12%F/m Vacuum permittivity
Eox=3.9*E0;%F/m permittivity of SiO2
Esi=11.8*E0;%F/m permittivity of Si
tox=1e-9;%oxide thickness in meters
tsi=10e-9;%silcon channel thickness in meters
x=1e-9:1e-10:50e-9;%direction along channel in meters
scale_length1=(tan(3.14*tox./x).*tan(1.57*tsi./(x)))-(3.9/11.8);%characteristics
equation
plot(x,scale_length1,'r')
ylim([-5 5])
refline(0,0)
now for solutions, I marked the intersection points of ref line and scale equation(2) for example see in the solutions.pdf attached file in which x1,x2,x3,x4 are the four solutions of equation 1 for tox=1nm and tsi=10nm case but by this, we can only get the solutions by observing the plot
not by MATLAB what I wanted that MATLAB should give the solutions of equation 1 by itself for example, tox=1nm and tsi=10nm solutions are 15.45nm, 4.47nm, 2.4667nm, 1.678nm
but this is by plot I'm also attaching a solution file and a file in which solutions for different tox and tsi combinations mentioned
I hope this would help
For more understanding of solutions, we can refer code provided by @John Sir, below although I think this also gives the solutions via plot, not by MATLAB which is my primary concern that answers should be given by MATLAB not by the plot(observing the intersection points)

Best Answer

This seems silly. Why are you using a 3 digit approximation to pi (and pi/2) here, then trying to solve for anything?
pi is already well defined in MATLAB.
format long g
pi
ans =
3.14159265358979
And pi/2 is also well defined. You write it as
pi/2
ans =
1.5707963267949
Of course, all of your other numbers are equally short, and I am sure, are not exactly values like 3.9 and 11.8.
Next, if you want results to have units of NANOMETERS, then setting tsi and tox to be on the order of 1e-9 is silly!
tox MUST have units of nanometers for your equations to make any sense at all. Therefore, tox is 1. Then x will also have units of nanometers, and it should be on the order of 1 too.
Eox = 3.9;
Esi = 11.8;
tox = 1;
tsi = 10;
x = 1:0.1:50;
So now everything will have units of nanometers. A number means something only to you. You must define the context, or a number is just a number. So if all numbers of interest are in the form of nanometers, then all is fine.
Regardless, it looks like you are trying to solve for all solutions of a problem that probably has infinitely many solutions.
So if we look for small x, then we see this plot:
ezplot(@(x) (tan(pi*tox./x).*tan(pi/2*tsi./(x)))-(3.9/11.8),[.01,2]);
ylim([-5 5])
refline(0,0)
Are you looking for the 4 largest solutions?
So if we instead re-parameterize your problem in terms of u=1/x, now looking for the smallest solutions, of infinitely many solutions, we will see this:
ezplot(@(u) (tan(pi*tox*u).*tan(pi/2*tsi*u))-(3.9/11.8),[0,.75]);
refline(0,0)
So for u=1/x no larger than 0.75 nanometers, we see the first 4 solutions, represented graphically. As x gets smaller, there will be infinitely many more solutions. But those are the possible solutions for the smallest values of u, and therefore, the largest values of x.
The difference is, when we try to plot this relation as a function of x, it gets nasty looking. Instead, things are more well behaved when we look for the smallest solutions in u, thus 1/x.