## asymptotics – Time to evaluate (1+x^i)

I am considering the asymptotic analysis required to convert a polynomial of the shape:

$$P(x) = prod_{i = 1}^{n}(1 + x^{s_i})$$

to its “full” representation, for example $$P(x) = 1+x^3+x^5+x^8+x^9+x^{12}+x^{14}+x^{17}$$.

Now, it would appear to me that we perform $$n$$ repetitions of performing $$2^i$$ multiplications, as for every expansion, we double the number of terms, as an example: $$(1+x^2)(1+x^4)=1+x^2+x^4+x^6$$. However, this smells a bit to me.

What is the asymptotic running time of expanding $$P(x)$$?

## ag.algebraic geometry – Evaluate the following algebraic expressions. Show all of your steps

ag.algebraic geometry – Evaluate the following algebraic expressions. Show all of your steps – MathOverflow

## calculus and analysis – How to use Mathematica to evaluate the limit of Exponential Functions?

Clear("Global*")


What you wrote is

(E^-2 x + 3 x)/x // Simplify

(* 3 + 1/E^2 *)


Presumably you meant to write

expr = (E^(-2 x) + 3 x)/x;


First, check that l’Hopital’s rule is applicable

Limit(#, x -> Infinity) & /@ {Numerator(expr), Denominator(expr)}

(* {∞, ∞} *)


The derivatives are

D({Numerator(expr), Denominator(expr)}, x)

(* {3 - 2 E^(-2 x), 1} *)


The limits of the derivatives are

Limit(%, x -> Infinity)

(* {3, 1} *)


The ratio of the limits is the limit of expr

Divide @@ %

(* 3 *)


Verifying,

Limit(expr, x -> Infinity)

(* 3 *)


## bash – Piping nc to sed and evaluate datetime for each row

Could someone provide any idea, how could i pipe data from nc to sed (or awk, or anything) and evaluate and write to file a timestamp after each row?
What i have:

# cat /etc/systemd/system/ncserver.service
(Unit)
Description=netcat listener
After=network.target

(Service)
Restart=always
RestartSec=1
ExecStart=/usr/bin/bash -c '/usr/bin/nc -n -v -l -k -p 1313 >> /opt/data/$(hostname)-$(date -u +%%y%%m%%d-%%H).txt'

(Install)
WantedBy=multi-user.target


simple listener – receives text via raw tcp, sends into the file (restarts by cron once a day to generate new file)

I want to append current timestamp to each row of text coming (at the beginning or the end of the row, doesnt matter).
Tried sed, awk, but the problem is that i cannot evaluate date for each row – it evaluates only once, when service started.
Looks like this

109582 ?        Ss     0:00 /usr/bin/bash -c /usr/bin/nc -n -v -l -k -p 1313 | /usr/bin/sed 's/^/'$(date +%s) 109583 ? S 0:00 /usr/bin/nc -n -v -l -k -p 1313 109584 ? S 0:00 /usr/bin/sed s/^/1617555467;/g  Pipe may be not the answer at all, but i’m kinda limited by bash. Any ideas?.. ## evaluation – What’s the difference between Evaluate and Replace command? all, I’m new to Mathematica, I am very confused between Evaluate and Replace (/.) command. I feel they are very similar. For example, In(2):= y = x + 2; y /. {x -> 3} Out(3)= 5 However, if I use In(1):= y = x + 2; Evaluate(y, x = 3) Out(2)= Sequence(5, 3) For both cases, I can get y=5. I think for the convenience, we can always use Replace instead of Evaluate for the simple substitution, correct? Or is there any case I should use Evaluate only instead of using replace If I want to substitute a symbol to another symbol or value? Thank you ## geometry – Evaluate$biggl(frac{V_{tetrahedron}}{V_{ellipsoid}}biggr)_{max}\$ for the given scenario

What is the maximum ratio of the volumes of a tetrahedron $$ABCD$$ inscribed inside an ellipsoid of radii $$a,b,c$$, provided that the tetrahedron contain the center of the ellipsoid (within it, or on a face or edge thereof)?

Otherwise stated, evaluate $$biggl(frac{V_{tetrahedron}}{V_{ellipsoid}}biggr)_{max}biggl|cup{abc}in{ABCD}$$

## plotting – Changes When Using Solve with Plot3D and Evaluate

I’m solving the following equation, which should be straightforward:

func1(A1_, A2_) := -((
4 I + 4 I A2^2 - 12 I A1 (1 + A2 ((2 - I) + A2 - 2 I eig)) +
A2 ((1 + 2 I) + 2 eig) ((5 + 4 I) + 4 eig ((1 + 2 I) + eig)))/(
8 A2));
sol1(A1_, A2_) := Solve(func1(A1, A2) == 0, eig);


I want to extract the analytic solution to this, but I’m not sure that what Mathematica is producing is correct. Here are the plots to explain what I mean:

This is a smooth plot and something that I expect. I’m plotting this with the line:

Plot3D(Re(eig /. sol1(A1, A2)((1))), {A1, 0, 1}, {A2, 0, 1})


Now if I try to get the analytic expression for this solution and I plot it, I get something different. I can demonstrate this just by changing my Plot3D command:

Plot3D(Evaluate(Re(eig /. sol1(A1, A2)((1)))), {A1, 0, 1}, {A2, 0, 1})


produces:

As you can see, the plot is different; it’s jagged with a discontinuity. With this, I can’t be sure that the analytic solution I extract from Mathematica is right. I’d like to either replicate the first plot with an explicit expression that I can acquire somehow or find out what function exactly Mathematica is plotting in the first instance. Am I missing something in regard to rule solutions here?

Thanks

## differential equations – How to use Lyapunov Exponet to evaluate the performance of a chaotic map

Thanks for contributing an answer to Mathematica Stack Exchange!

But avoid

• Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

## numerical value – N won’t evaluate expression numerically

Using N(expr) is not evaluating this expression numerically for me and I can’t figure out why. I originally thought it’s because I wasn’t doing NIntegrate but I’ve seen multiple examples of people using N(integral expr) to get a numerical result.

c1 = 1/(Integrate(e^(-0.04 x), {x, 5, 60}));
c2 = 1/(Integrate(e^(-0.16 x), {x, 5, 60}));
f1(x_) := c1*e^(-0.04 x);
f2(x_) := c2 * e^(-0.16 x);
P1 = N(f1(10)*f1(32)*f1(38)*f1(40))
P2 = N(f2(10)*f2(32)*f2(38)*f2(40))
`

out $$frac{log ^4(e)}{left(frac{25.}{e^{0.2}}-frac{25.}{e^{2.4}}right)^4 e^{4.8}}$$
out $$frac{log ^4(e)}{left(frac{6.25}{e^{0.8}}-frac{6.25}{e^{9.6}}right)^4 e^{19.2}}$$

I’ve tried evaluating it numerically in different stages like at c1, or in the function and still no numerical result. Any help would be appreciated

## How to evaluate fit at a fixed point

How can I evaluate the result of Fit to the data used the example code below

data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}};

line = Fit[data, {1, x}, x]

How do I now evaluate the function line at a particular point where x = 2.5 let’s say.