# Tagged Questions

The tag has no usage guidance.

339 views

### How can I smooth a 3D surface generated by RegionBoundary?

I have a set of points that belong to the surface of an object. I would like to approximate a surface to which I can compute the distance. of other points. With the nice code of this post, I was able ...
1k views

### How to improve the accuracy of this Monte Carlo simulation

A friend of mine went on an interview and he was asked to calculate the angle between the hour hand and minute hand of an analog clock when the time was 3:15. Arguably, this is a trivial problem that ...
468 views

### Chebyshev Approximation

Is there functionality in Mathematica to expand a function into a series with Chebyshev polynomials? The Series function only approximates with Taylor series.
311 views

### Find parameters that minimize the distance between two curves in terms of the infinite norm

I am trying to implement a very simple NMinimize code that would search for parameters of a polynomial that minimize (globally) the distance between this polynomial ...
806 views

### Solving $L=\frac{3}{2} \sqrt{4 \pi ^2 A^2+W^2}-\frac{\sqrt{5 W \sqrt{4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt{2}}+\frac{3 W}{2}$ for $W$

When I solve the aforementioned equation for $W$ or $A$ on Mathematica I get a long and ugly equation in return, namely one of the solutions for $W$ is: (attempt to read at your own health) ...
394 views

236 views

### Efficient Lloyd Sampling of Images

I want to sample a grayscale image so that every voronoi cell contains approximately the same total intensity using lloyd sampling. My current code is kind of slow and I was hoping for some advice to ...
187 views

### First order approximation

How can I neglect higher orders of approximation in Mathematica? Suppose I want to find the roots of a simple quadratic equation like ...
207 views

### Approximate analytic solution to a polynomial equation

The analytic solution of the equation $$1-\frac{2M}{r}+\frac{Q^2}{r^2}-\frac{\Lambda}{3}r^2 = 0$$ obtained by using the code ...
394 views

### GeneralMiniMaxApproximation - Dividing out the zero

MiniMaxApproximation is used to generate minimax approximations. I'm interested in the "dividing out the zero" trick. The documentation discusses a nice example. Suppose we want to construct a ...
186 views

### Isolating cross terms

I have a set of expressions that contains terms like $\frac{1}{(x + a + b)(c+d)}$. I would like to simplify the denominator so that products of $a,b,c,d$ are dropped, but $x c$ and $x d$ are kept. ...
1k views

513 views

### Small Issue with Chebyshev Derivative Approximation

I am trying to approximate the derivative of a function from its Chebyshev expansion. I start out with the following random function: ...
127 views

### Torus-geometry algebraic equations using Nsolve and Reduce

Somehow a set of naive-looking equations cannot be solved by using NSolve. Mathematica returns a message like this: ...
51 views

### Why does MiniMaxApproximation fail in this simple case?

Why does MiniMaxApproximation[Erfc[t], {t, {0, 2}, 0, 1}] give the following error? ...
490 views

### Assigning an analytical approximation to the error function erf(x)

Working with some iterative integral equations, I have Gaussian density functions involved therein. Integrating the Gaussian function I obtain the error function. When I take the second integration, ...
197 views

### FindFit with a sophisticated function (integral)

I am trying to find a fit to the distribution function (empiricial data) in terms of a function which is itself an integral of a product of two simpler functions (two polynomials), that is the model. ...
180 views

### Find root approximants for low-precision numbers

I want to be able to find low-complexity algebraic approximants to decimal numbers. For example, 1.41 can be approximated as a solution to the polynomial x^2==2. ...
61 views

### Looking for a convenient way to replace a large data sample with an analytic approximation

Suppose that data is a large data sample, and that Histogram[data] produces a very smooth-looking distribution. Since ...
98 views

### Writing a function to set up and solve the least squares problem

I have setup the explicit line equation for a given set of points using least-squares approximation and the knots computed below. I have tried extending the same code for use with an arbitrary degree, ...
130 views

### Approximation of $f(x)$ at large values of $x$?

Suppose you a function $f(x)=1/x+x^2$. At large values of $x$, it is closely approximated by $f(x)=x^2$. Can Mathematica do this for me for a more complicated function? How would I input the ...
118 views

### Approximating Magnitude of Solutions

I was recently lecturing on the hierarchy of functions in a calculus class. Discussing the fact that eventually any exponential growth function will overcome any polynomial. As an example, I tried ...
349 views

### Perturbation theory with Mathematica: Definite integral of polynomial times exponential times hypergeometric function of imaginary argument

I would like to ask also Mathematica users about my question from the math forum. To expand, I'm adding the code which calculates the full double integral for $n=0$ and $\mu=0$ (the second in the post)...
66 views

### Finding input of the function $f(a,b,c) = (d,e)$ such that $|d-e|$ = constant for $d\in[d_0,d_1]$

The actual question contains a few more parameters than mentioned in the title, but the idea will remain very similar. Lets begin abstractly; I have a certain function $f(a,b,c) = (d,e,g,h)$. I am ...
171 views

### Seeking simple function in interval

I am a bit rusty, and struggling to solve this problem. Looking for a simple, well behaved parametric function f[t], from [0,1] to [0,1] such that: f[0] = f0; f[1] = f1; f'[1] = ff1; where -1<= ...
170 views

### Use NMinimize instead of FindFit for constrained search (of coefficients)

(My problem is more complex, but let us formulate it through this example) I am trying to find the best polynomial approximation to the following function ...
25 views

### Approximating Pi, fraction in another [duplicate]

In a previous exam, this question was asked: We want to approximate Pi using this formula Write a function that calculates the right hand side of this equation truncated at the nth term. For ...
47 views

### Computing an inexact derivative with some terms preserved in exact form

I am beginning to learn Mathematica and have the following question: How can I return a derivative with exact numbers instead of one involving numerical approximations? My original, single variable ...
239 views

### How do I estimate the Pareto front in my multiobjective optimization problem?

I need to minimize a function of two parameters that gives two "stress" outputs {A,B} = f[tau,mu]. How do I estimate (even roughly), the Pareto front for this ...
133 views

### Smooth Max and Abs

I'm trying to implement smooth approximations of Max and Abs functions. Moreover I want the functions to map element-wise on tensors. Here's my code. ...
629 views

### How to visualise an iterative approximation to pi

I'm experimenting with different algorithms that approximate pi via iteration and comparing the result to pi. I want to both visualise and perhaps know the function (if any) that describes the ...
258 views

### Showing separate surfaces

The XYZPipeJunction is removed using circular trig functions from Both. ...
472 views

71 views

### Decimal representations of analytic values in an expansion

I have a solution to an ODE (which I call sol), which I would like to expand in terms of Log[1+x] around x=-1. I thought that: ...
49 views

### Two Variable First Order Approximation [duplicate]

I found that using Series and Normal command, I am able to approximate the first order of x or y, but If I also get rid of x*y (cross term), Series command does not work any more. Let's define some ...