Solution of trigonometric equation

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)

 Accepted 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.

3 Comments

NILESH PANDEY
NILESH PANDEY on 30 Sep 2017
Edited: NILESH PANDEY on 30 Sep 2017
Thanks for the answer @John D'Errico Yes I'm looking 4 or 5 largest solutions because the solution we got here they will be put in an exponential series exp(-constant*x) so as x decays series converges so fast so we only need 4-5 solutions to get a good result
and for tox and tsi in nanometer here is explanation actually Eox=3.9*8.85×10−12 F/m. and Esi=11.8*8.85×10−12 F/m. where 8.85×10−12 F/m is Vacuum permittivity so they all are in MKS you don't have to worry about the units
I didn't write this because we are interested in Eox/Esi ratio which is called relative permittivity any physics guy can tell you these and you said that it is silly to write pi=3.14 this depends on how much
accuracy a person wants the solutions which I provided are pretty much correct even they matched with practical device length(I'm talking about DG-MOSFET) and those solutions verified by UNIVERSITY OF CALIFORNIA with practical results for today devices
All the solutions we are getting basically a device length
and you said that Eox and Esi can't have exactly 3.9 or 11.8 that you can see this by yourself online they actually have these values
now I see your answer you are also giving the answer by plots
If you read my question correctly I stated earlier that I already got the answer by plots but I want them by MATLAB not by plots So, this is not what I asked
What you don't understand is that when you approximate coefficients to 3 digits, the error in the solution will often be amplified. You have perturbed the function from the true one that you want to solve, into some approximation, with a solution that is different from what you are looking for. But the perturbation may be one that amplifies the error in your coefficients. Being sloppy with computations leads to sloppy results, when it was never needed. Worse, being sloppy introduces random errors into a problem that you apparently don't even know how to solve. So you have no idea if the perturbed solution is close to the desired one or not.
As for solving the problem, USE FZERO!!!!!!!!!! There is nothing complicated here.
ufun = @(u) (tan(pi*tox*u).*tan(pi/2*tsi*u))-(3.9/11.8);
u1 = fzero(ufun,[0,.1])
u1 =
0.0645640586835582
1/u1
ans =
15.4884934496018
Was that really difficult?
For the next root, just pick out an interval where the solution lives, then apply fzero. You can even do it automatically, just by evaluating the function at a sequence of points, then looking for sign changes. Watch out for the singularities of course, since there will generally be a singularity between each pair of true roots. The one exception to that rule seems to be around 1.
Some basic analysis should even be able to identify where the singularities lie. That is, for which values of z does tan(z) have a singularity? Now look at your function. It is just a product of two tangents.
Note that by transforming the problem in terms of u, the singularities are now at nice simple increments. This is a simple problem.
Thanks Sir I just checked your method this gives the correct results although I was using fzero command earlier but I wasn't converting the singularity as you did in your last comment
So, I was only getting the principle root(only one largest) no matter I reduce the interval for fzero or not
but your method is quite easy and correct to do the same thanks for your help and time I really appreciate that

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!