# Tag Info

Accepted

### Efficiently Mowing Grass with Mathematica

This is just starting ideas for arbitrary regions. Perhaps you can improve it. Version 1 Define concave region with holes, which can be generalizable to arbitrary complexity: ...
• 73.1k
Accepted

### Finding an ellipse of minimum area that encloses a set of points

You are looking for BoundingRegion with the "MinEllipse" region specification: ...
• 67.2k

### Efficient use of GatherBy on large list to remove duplicates

If you want rules without duplicate keys, you really should be using Associations instead of lists of rules. They're much faster and automatically handle key duplicates. In this case, you could do: <...
• 23.5k

### Rectangular matrix for Tikhonov first order regularization

ClearAll[sa] sa[n_] := SparseArray[{Band[{1, 1}] -> -1, Band[{1, 2}] -> 1}, {n - 1, n}] sa[5] Normal @ sa[5] ...
• 395k
Accepted

### Placing a disk of maximum size in a region surrounded by random points

We union the boundary of convex hull chm and random points x as a single region and use ...
• 72.7k

### Finding the largest disk within a convex region using Region primitives

In version 13.3, the problem can be solved with InscribedBall ...
• 15.5k
Accepted

### Minimize is returning unevaluated for a simple positive integer domain problem

You need to specify what you mean by "smallest solution". If it means that you want the smallest value of $x+y$, then you can do ...
• 47.4k

### SVD decomposition with optimization

The matrix that you are looking for is B = LinearSolve[A\[Transpose].A + \[Lambda]^2 IdentityMatrix[n], A\[Transpose] ] Here a toy example to convince you: ...
Accepted

### Using ParallelTable for assignment

The direct answer to "how should it be implemented" is to use SetSharedFunction. Evaluate SetSharedFunction[s1] before ...
• 28k
Accepted

### How to find the nearest element that is bigger than x?

Nearest will either give us the value we're looking for or the value to the left in a sorted list. So we can simply find the ...
• 35.9k
Accepted

### FindMaximum, error in solution

I believe it is the non-differentiable kink of your function that is causing troubles to the maximizator. Luckily, in your case, you can use Maximize to find the ...
• 24.7k

### How to find the maximum value of this trigonometric function?

A contour plot of the condition shows that $\beta$ will need to be between 0 and around 0.5: ...
• 41.7k

### Finding the sum of eigenvalues of a matrix depending on the parameters

The sum of the eigenvalues can be calculated without diagonalizing the matrix. Example: generate random $n\times n$ Hermitian matrices: ...
• 47.4k

### Efficient use of GatherBy on large list to remove duplicates

Map[DeleteDuplicatesBy[First]] @ lis {{a1 -> x1, a2 -> x2, a3 -> x3}, {b1 -> y1}}
• 395k
Accepted

### Why can't we find the minimum value of 2a+b?

conditions = Reduce[{f[a] == f[b], a > 0, b > 0, b > a}, {a, b}, Reals] Minimize[2 a + b, conditions, {a, b}] ...
• 72.7k

### Why can't we find the minimum value of 2a+b?

NMinimize together with modified constraint gives a solution: f[x_?NumericQ] := Abs[Log[x]] Plot[f[x],{x,0,2}] Plot show that ...
• 53.8k

### Is it possible to ask Mathematica to obtain the function describing the upper and lower boundaries of a combinations of functions?

Something like: ...
• 51.5k
Accepted

### Improve performance of Linear Optimization

For machine precision numbers, the actual backend of LinearOptimization will be some compiled and heavily optimized library. Such libraries require the problem to ...
Accepted

### Why hasn't the minimum value of a+b been determined?

The following works in 13.3.1 on Windows 10. Minimize[{a + b, Reduce[9 == 9^(1/a) 3^(4/b) && a*b > 0, Reals]}, {a, b}] \$\left\{2 \sqrt{2}+3,\left\{a\to ...
• 26.3k
Accepted

### Colouring Bifurcation Diagram

You can use ContourPlot to make such 1D bifurcation diagrams easily as in this answer, using ConditionalExpression to handle the ...
• 20.2k
Accepted

### Findroot :unable to find a solution that meets the convergence criteria

System can be solved with Newton method as follows ...
• 44.5k
Accepted

### Optimize parameters for differential equations

You could use ParametricNDSolve with A and B as parameters and then use ...
• 3,683
Accepted

### Find minimum of integral with two variable terms

One way to do it in a more numerical way is this: FindMinimum[ Inactive[NIntegrate][(-b - a*x + (1 + x^2)^(-1))^2, {x, 0, 1}], {{a, 1}, {b, 1}} ] The advantage ...
• 23.5k

### Finding maximum value of a function with parameter

Abs is a Complex Function. We use Sqrt[x^2] instead. ...
• 72.7k

### Minimax problem where a combination of Minimize and Maximize gives no result at all

There doesn't seem to be a closed-form symbolic solution for Minimize[{(p Log[(p/(p + a))] + (1 - p) Log[((1 - p)/(1 - (p + a)))])/a^2, 0 < p < 1/2}, p] So ...
• 41.7k
Accepted

### How to find a densest configuration of several non-overlapping unit disks?

We try to manually construct the convex hull. ...
• 72.7k

### Packing unequal spheres into minimal cuboid

Try RegionBounds to get the enclosing cuboid a,b,c of the two spheres ...
• 53.8k
Accepted

### Packing unequal spheres into minimal cuboid

A generalization of @Ulrich Neumann's code: ...
• 3,683