functions – Numerical maximization with alternate sum

I need to maximize a function that involves an alternate sum and a set of restrictions. I have tried the following code:

NMaximize ({(- 1) m * n!, N + m == 7, m> 0, n> 0}, {m, n})

However, the error message

NMaximize: The objective function {(-1)^m n!} should be scalar-valued


Is there a numerical maximization method that can be used for functions like this?

SUM column except for cells where there is text in a cell of a separate column but in the same row? Google spreadsheets

I need a formula but I don't know how to do it and I don't know if it's possible.

Here is a photo to show what I want. I hope you understand.
visual explanation

problem that involves limit, sum and function

Can someone help me with these questions:

In the link above there is an attached photo that I cannot resolve by myself.
I tried to solve the limit by taking the logarithm and then applying the l & # 39; hopital rule. But it becomes even more complicated.

A question about the use of the sum

Suppose I have the following formula. Calculate the average value of $ n $ evenly space numbers in the range of $ L $ to $ H $.

1/n Sum(x, {x, L, H, (H - L)/(n - 1)})

My question is, how can I use Mathematica to calculate the average value of the above, when I delete a specific number from the sequence. I'm looking for an elegant solution, maybe one that removes a particular index, or some other method that I haven't thought about.

Ideally, the solution should allow me to plot the average of the numbers on the Y axis and the index removed on the X axis.

calculation – Derive $ sum i ^ 2 $ without first knowing the answer

Thank you for contributing a response to Mathematics Stack Exchange!

  • Please make sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on how to write excellent answers.

Sum Expectations

I would like to use Mathematica to derive some limits in empirical estimators, such as $ E (Y) $ where $ Y = tfrac1n sum_ {i = 1} ^ n (X_i – X) ^ 2 $ Y $ X = tfrac1n sum_ {i = 1} ^ n X_i $.

For a moment I thought this worked:

Expectation(Sum(X(i), {i, 1, n}), {X(i) (Distributed) BernoulliDistribution(p)})

Out(*) = n p

However, it quickly turned out that Mathematica only considers this to be a unique variable called X(i).

I wonder if Expectation Can it be done to handle a variable number of random variables?

Geometric sum and convergence

Suppose I have an infinite sum like
$$ sum_ {n = 0} ^ { infty} 2 ^ n $$ that diverges

I want to know what is the limit of the following equation
$$ lim_ {N to infty} frac { sum_ {n = 0} ^ {N-1} 2 ^ n} {2 ^ N-1} $$

It is $ 1 $or is it still diverging?

Algorithms – How would you find out how to represent a certain set of numbers from a sum?

I am looking for an algorithm for my problem. I have 10 buttons,
Alpha = 1,
Bravo = 2,
Charlie = 4,
Delta = 8,
Eco = 16,
Fox = 32,
Golf = 64,
Hotel = 128,
India = 256,
Juliet = 512,
Each button can only be pressed once at the same time, for example; If I pressed Alpha, Bravo, Charlie and Delta at the same time, I would get 15. No number will be doubled and should only reach about 1023 possible combinations. Any ideas?

calculation of a hypergeometric sum

Leave $ q, ell, M in mathbb {N} $
I'm not familiar with Mathica, Maple or Mathlab to at least see what this sum is supposed to be. I wonder if anyone can calculate this sum
sum_ {m = 0} ^ q binom {q-m + ell-1} {q-m} binom {2m + M-1} {2m}

Sum of Conditional Row

I would like to add a column of cells if the corresponding cell in the next column contains a string of any type. I have tried using SUMIF but I can't find a way to combine it with ISBLANK or ISTEXT.

For example, in this case, the function should generate 12.

| 5 | x |
| 6 |   |
| 7 | y |