# Tag Info

2

Maybe with some or all of these changes: ReImPlot[ (* the 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} (* better starting point *) ], {vd, -10^8, 10^8}, (* ...

6

Don't have the time to fully answer this yet, but here's a debug tool I developed previously. First off we can figure out how OBJ is exported getFormatExportData["OBJ"] {"FormatName" -> "OBJ", "DefaultElement" -> "Graphics3D", "DocumentedElements" -> None, "Function" -> ...

0

Why CSV? Why not mx? Export["tab.mx", tab] tabImport = Import["tab.mx"]; InputForm@tab == InputForm@tabImport (* True *)

3

Export uses CForm under the hood for formatting of real numbers: TracePrint[ExportString[.240, "CSV"], _ToString, TraceAction->Print@*FullForm] HoldForm[ToString[CForm[0.240.],InputForm]] "0.2" So, one idea is to temporarily modify the CForm formatting of reals: Internal`InheritedBlock[{CForm}, Unprotect[CForm]; CForm /: ...

1

I think a Chebyshev method could be adapted to your workflow. I don't know what your workflow is, so I don't have any advice about that. Here's a comparison with NIntegrate and @Carl Woll's example. (ClearAll[f]; f0[x_] := ExpIntegralE[-5, x] - 5! x^-6; f[0] = SeriesCoefficient[f0[x], {x, 0, 0}]; f[0.] = N@f[0]; f[x_] = f0[x]; pp = 16 (* order*); ...

2

One idea is to deform the integration contour around the singularity. For your example: f[x_] := ExpIntegralE[-5, x] - 5! x^-6 NIntegrate[f[x], {x, -1, I, 1}] -0.3767 - 2.02699*10^-13 I We can check by integrating the series approximation: g[x_] = Normal @ Series[f[x], {x, 0, 12}] NIntegrate[g[x], {x, -1, 1}] -(1/6) + x/7 - x^2/16 + x^3/54 - x^4/240 + x^5/...

Top 50 recent answers are included