# All Questions

85 views

### PrimeNu counting function

Building on this question, what is the most efficient counting function for distinct prime factors? It would obviously be more efficient if Prime and ...
316 views

### Maple like collect command in Mathematica

In Maple I often simplify expressions for functions of same argument using the collect command: > collect(a*f(x)+f(y)+x*f(x), f, factor) (a+x)*f(x)+f(y) where ...
84 views

### Asymptotics of sum of binomials

I would like to find the asymptotics of Sum[Binomial[n,i]*1/i^((n+1)/2),{i,1,n}] I saw Find asymptotics of Sum[2^i*Binomial[n-i-1,2*n/3-1],{i,0,n/3}] but I ...
165 views

227 views

### Solving for equilibrium distribution (symbolic) by matrix multiplication

I have a huge transition matrix (81x81). The matrix is too huge to paste here, so I store it in this notebook. (There are constraints on the symbols: $0<p_b<1$ and $0<p_g<1$. If further ...
3k views

### How to create effect like Van Gogh's stroke brush?

I need to apply Van Gogh's stroke brush effect to a random image Take the following image as an example: Thank you so much if you could help!
131 views

### Making a predictive statistical model

I am totally new to Mathematica, and I have never used a similar program, apart from perhaps Excel (and I didn't even use Excel on a professional level). So I want to create a mathematical model ...
170 views

### How should I go about writing more functional and list based code? [duplicate]

I've heard that Mathematica is usually faster when the code is list-based and/or uses a functional paradigm. I'm still working on getting the hang of this; there are a lot of ...
189 views

### How do I construct a non-linear model from experimental data?

I want to find a function $w=f(x,y,z)$ that fits experimentally determined values of w. For example, assume ...
130 views

### Deleting elements on a list by the first element of another list

I was trying to make this L1 = {{2, 1}, {6, 4}, {8, 7}, {9, 5}}; L2 = {{2, 9}, {9, 6}}; L = Union[L2 , L1] And I used this: ...
74 views

### Defining functions that reference other values

How could I define a function that references other values? eg a = 2 x; b = 4 k; f[k_, x_] := a^b
196 views

### Is it possible to convert expressions containing Root objects to Excel formulas?

I am still a beginner and do not fully understand pure functions and root objects. When I tried to calculate the inverse of a function, Mathematica gave me: ...
1k views

### Threads vs Cores: How many kernels need to launch in parallel Mathematica?

I have a dual-core intel machine. I would like to test how many parallel local kernels should be launch to get the optimized performance. Knowing that the HyperThreading technology of Intel could run ...
81 views

### Need to run evaluation 2 times

Why does this only work after running the evaluation 2 times? ...
378 views

### Edit Plot/Graphics after it's been drawn. [duplicate]

Sometimes I run into a situation when there are graphics objects (mostly plots) that take a while to draw. Good practice would suggest you do all your evaluation outside ...
253 views

### How to simplify to form without imaginary unit

I have an integral that I compute with Mathematica and as a result I get a seemingly complex expression (i.e. the expression contains the imaginary unit, $i$, at some places). However, if I try to ...
430 views

### A fast way to compute arrays avoiding If or Which

I found out that if I have to calculate huge arrays with most of the elements being zero( let's say each row has 10000 elements and only 8 are non zero) and the non zero elements' positions being ...
36 views

### Internals of Prime function [duplicate]

Does anyone knows how exactly Prime works ? For example how Prime[1000000000] is calculated ? The only information I found was ...
91 views

### ctags for Mathematica files?

I alway use vi to edit Fortran files. I can use ctags to know which variables and functions I have already defined. Now I use vi to edit Mathematica *.m files. I tried to use ctags for *.m files, but ...
124 views

112 views

### Button with for loop

How can I call a function that has a for loop inside a button? If I just write button[{"name", function[]}] nothing happens.
482 views

### How to simulate the true reflective movement of a particle bouncing around in an ellipse?

Please help me to simulate the movement of a particle inside a region with elliptical walls such that particle is reflected from the walls and continues to move. A friend was able write code to ...
445 views

### Plotting Voxel in mathematica

I am developping a 3D reconstruction application. I recuperate the voxels coordinates (the coordinate of each voxel) of the object that I need to reconstruct. Each voxel have a dimensions like this ...
314 views

### Feynrules -> FeynArts issue

When I try to use model files generated by FeynRules in FeynArts, I always get errors of this form Coupling definition in ...
356 views

### First 10 digits of $\pi$ without rounding

I need to have $\pi$ with an accuracy of $10$ digits. My first guess would be N[Pi, 10] However, this rounds to the last digit instead of just chopping of any ...
294 views

### No response to an infinite limit

Trying to compute this limit, things seem to get frozen, even for hours. What would you recommend to fastly compute it? ...
1k views

### How to find the area between two curves

Find the area between y = 1 - x/π and y = Sin[x]. Here is what I have typed in so far into Mathematica: ...
123 views

### Specify positions in a SparseArray using patterns with functions

I spent some time trying to figure out what was what was making so slow the calculation of the following array(actually this is only a SUPERsimple toy model): Input to the array: ...