TransWikia.com

How to make FindRoot work with PolyLog functions

Mathematica Asked on June 5, 2021

I have the following code:

q = 1.6*10^-19;
hbar := 6.63/(2*[Pi])*10^-34;
m0 = 9.1*10^-31;
kb = 1.38*10^-23;
Cap := 4.5*10^-3;
W := 50*10^-6;
mu := 4.3*10^-4;
n := 20;
vth = ((3*kb*300)/m0)^0.5;
vt := -3.5;
Rex := 15 ;
vg = 0;
Plot[id /. 
  FindRoot[(id - (Cap*W*mu*(n*vth)^2)/(
      7*10^-6)*(PolyLog[2, -Exp[(vd - id - vg + vt)/(n*vth)]] - 
        PolyLog[2, Exp[(id - vg + vt)/(n*vth)]])), {id, 
    10^-6}], {vd, -1, .872}, ImageSize -> Large, 
 AxesLabel -> {vd, id}, LabelStyle -> {15, Bold, Black}]

It shows this error:

enter image description here

How can I specify the correct AccuracyGoal and PrecisionGoal for my problem. Also I want to plot the $id$ as a function of $vd$ for different $vg$, is there a way to automate it?

One Answer

Maybe with some or all of these changes [update: changed starting points to complex numbers ±10^6(1±I)]:

ReImPlot[                        (* solution is complex-valued *)
 id /. FindRoot[(id - (Cap*W*mu*(n*vth)^2)/(7*10^-6)*(PolyLog[
         2, -Exp[(vd - id - vg + vt)/(n*vth)]] - 
        PolyLog[2, Exp[(id - vg + vt)/(n*vth)]])),
   {id, Sign[vd] 10^6 + 10^6 I}  (* better starting point *)
   ],
 {vd, -10^8, 10^8},              (* larger plot domain *)
 ImageSize -> Large, AxesLabel -> {vd, id}, 
 LabelStyle -> {15, Bold, Black}]

enter image description here

Changing the starting point to Sign[vd] 10^6 - 10^6 I gives conjugate solutions.

Answered by Michael E2 on June 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP