Hot answers tagged

23

Short answer The local variables of the form varname$... are used by the system, and it is unwise to use symbols with such names as local variables. With, like many other lexical scoping constructs, performs excessive renamings, often even in cases where it isn't strictly necessary. This probably has to do with efficiency - full analysis may be more costly....


3

You can use RegionFunction to specify the range. Plot3D[(-1 + w + 3 s w)/(2 (-1 + w + 4 s w)), {s, 0, 3}, {w, 0, 1}, RegionFunction -> Function[{s, w, z}, (1/4 < s <= 1/2 && 1/(4 s) < w <= 1) || (s > 1/2 && 3/(2 + 8 s) < w <= 1)]]


2

Some alternatives for thought food... slist /. x_Integer:>g[x] ...or... Last@Last@Reap[Scan[Sow[g[#]]&,slist]]


2

g[w_] := w^2 + 1 slist = Range[0, 100, 1]; g[slist] {1,2,5,10,17,26,37,50,65,82,101,122,145,170,197,226,257,290,325,362,401,442,485,530,577,626,677,730,785,842,901,962,1025,1090,1157,1226,1297,1370,1445,1522,1601,1682,1765,1850,1937,2026,2117,2210,2305,2402,2501,2602,2705,2810,2917,3026,3137,3250,3365,3482,3601,3722,3845,3970,4097,4226,4357,4490,4625,...


2

I think the OP asked from a algebraic resp. beginners point of view as of calculus, so is my answer: It assume it is looking for Discriminant, fr = FunctionRange[x/(1 + x^2), x, y] $-\frac{1}{2}\leq y\leq \frac{1}{2}$ fr[[1]]; fr[[5]]; fr == x/(1 + x^2) $\left(-\frac{1}{2}\leq y\leq \frac{1}{2}\right)=\frac{x}{x^2+1}$ Plot[{x/(1 + x^2), fr[[1]...


2

Maybe I misunderstood this problem? My solution is much more simpler(and readable, cause I'm simply too stupid to understand @jkuczm's code. I'll appreciate that if you may kindly add some explanation?) than @jkuczm's solution, but they generate the same result........ Code first: p[e_] := If[AtomQ@e, If[NumericQ@e, e, e[##]], p /@ e] f[e_] := Evaluate[p[e]...


1

Use Normal to get the polynomial out. Then work with it. The O[...] term can do funny things that are not obvious. In[2]:= SS = Normal[S] Out[2]= a/(1/x)^(9/2) + b/(1/x)^(7/2) + c/(1/x)^(5/2) + d x^2 In[7]:= S1 = FullSimplify[(SS/x^2 - d)*x^2] S2 = FullSimplify[SS - d*x^2] Out[7]= (c + x (b + a x))/(1/x)^(5/2) Out[8]= (c + x (b + a x))/(1/x)^(5/2) In[9]...


1

Try the following shory code: DeleteDuplicatesBy[lst,Floor[#,10^-4]&] Will this help?



Only top voted, non community-wiki answers of a minimum length are eligible