2
votes
1answer
81 views

Failure in the use of FullSimplify

My question is about an apparent failure of the function "FullSimplify" to simplify an easy algebraic expression. This is the expression that I ask Mathematica to evaluate: ...
3
votes
1answer
355 views

Plotting random circles in a square

How can we draw 20 circles which have random radius in a specified range, with random positions. All centers must be in a square with side=10 (for example centimeter): every overlapping between any ...
2
votes
1answer
122 views

How to create a smile animation in Mathematica?

I want to create a yellow smile, with normal mouth which smiles in cycle. I only know that I need to use CDF player and Manipulate, but do not have any idea how to do that. Thanks!
4
votes
2answers
284 views

How to compile this function

I want to compile my function that calculates the energy of a particle system. This is what I've tried: ...
0
votes
1answer
44 views

Defining a function in terms of a solution returned by Solve

The title is a little ambiguous, but I didn't know how else to put it. What I'm trying to do is solve a system of equations ...
4
votes
1answer
126 views

Superimposing ListLineIntegralConvolutionPlot with transparent noise over ListContourPlot

I have an array of 128x256 data points in a rectilinear array. For each point there is a 2D vector quantity and a scalar quantity (normalised to -1 <= x <= 1). I very much like the ...
3
votes
1answer
114 views

How to write a pattern that matches all functions

What is the correct way to match a function in an expression in the way that Cases[Sin[x] Cos[x], _Sin | _Cos, {0, Infinity}] matches ...
21
votes
3answers
460 views

How to improve performance of BesselJ to the level of GSL?

Consider the following code: zs = N /@ Range[0, 12, 10^-5]; AbsoluteTiming[bessels = BesselJ[1, #] & /@ zs;] Length @ zs I've tried to measure only ...
3
votes
3answers
84 views

Orderless storage of tabulated function values

I would like to elaborate on my previous question Function of arguments given in non-fixed order and a relevant related one Best practice of passing a large number of parameters to functions I find ...
2
votes
2answers
250 views

Strange Boundary NDSolve Problem

Mma10.1 doesn't work with the following boundary problem: ...
0
votes
1answer
80 views

What is a good way to check what kind of a function a function is?

i want a module or function or switch or If (whatever works), what asks if a function is an e function or a polynomial(a hole number one or fractorial), a exponential function, a logarithm function ...
5
votes
1answer
173 views

How to fill the closed region by ParametricPlot with solid color?

I am interested in the following implicit curve with parametric equation: $$ \left\{\quad \begin{array}{rl} x=& 9 \sin 2 t+5 \sin 3 t \\ y=& 9 \cos 2 t-5 \cos 3 t \\ \end{array} \right. $$ ...
5
votes
1answer
73 views

Ordering in noncommutative multiply

I have an expression like s ** p1 ** p1 ** p2 - s ** p1 ** p2 ** p1 Which should be zero because the commutator between p1 ...
6
votes
2answers
487 views

Using Greek $\LaTeX$ fonts

I want to use the $\LaTeX$ font in graphics. For text/numbers, this is easily done by FontFamily -> "CMU Serif" (on Ubuntu) like this: ...
0
votes
1answer
92 views

Use FindRoot to get the root with minimum imaginary part

For example, define test[z_] := Cosh[0.5132928614530164 z] + 0.5934823341977118 Sinh[0.5132928614530164 z] And ...
6
votes
1answer
139 views

Actual bins used for Pearson Chi Square Test

PearsonChiSquareTest[data, dist] computes bins for data as a step towards calculating the test statistic. For continuous ...
6
votes
1answer
297 views

What is the relationship between Thread and MapThread

I hope this is not a silly question, since there are plenty of questions on Thread and MapThread. However, I still cannot quite ...
5
votes
1answer
144 views

BarChart3D: varying individual bar color

I've been working with a chart like so: ...
4
votes
1answer
171 views

Computing Reversible CA with CellularAutomaton

This computes and plots 127 steps of the evolution of 150R (the reversible version of rule 150). ...
0
votes
1answer
99 views

Problem with writting into a matrix in Mathematica [closed]

I have declared a matrix using S = ConstantArray[0, {246,246}] And when I try to write into it by a loop I get the following error "Tag Times in 0\ Null is ...
0
votes
0answers
72 views

Mathematica SQL command that counts records in table

Is there a DatabaseLink command other than SQLExecute that can be used to count the total records in a database table?
7
votes
6answers
694 views

How to draw a dodecahedron with each face modified to a pentagram?

I'd like to draw a dodecahedron with each face carved on the sides so it becomes a pentagram. I wonder how to start to do this kind of task in the Wolfram Language? Edit: The result should still be ...
1
vote
1answer
220 views

Precision while calculating Fourier transform

I'm trying to understand how precision works in Mathematica. Particularly I'm calculating discrete Fourier transform using the Fourier function and calculating it "...
14
votes
2answers
379 views

How to programmatically ask if Mathematica is running as an Administrator

To avoid execution problems in a program I need to know if Mathematica has been "Run as administrator". What would be the cleanest way to programmatically getting this information?
4
votes
1answer
102 views

when two associations are equal?

<|a -> 2, b -> 3|> == <|b -> 3, a -> 2|> returns False; can anybody explain why? If I am not mistaken ...
1
vote
0answers
51 views

Unexpected behaviors with Edge Weights

Noticed some bizarre behavior when subgraphing on weighted graphs, which probably extends to graphs with arbitrary edge properties. I construct a weighted graph with five edges, defining a specific ...
3
votes
1answer
153 views

How to plot points using ParametricPlot3D?

I have the following Mathematica code: ParametricPlot3D[{{0 + 0*t, 10 - 1*t, 9 - 1*t}, {7 - t, 7 - t, 6 - t}, {0, 0, -1}}, {t, 12, -20}] The last "parametric ...
3
votes
1answer
305 views

Plot a function on a restricted domain

I want to plot a function $f:\mathbb R^n \rightarrow \mathbb R$ restricted to a domain $D \subset \mathbb R^n$. The domain $D$ is usually specified as the set of zeros for a set of polynomial ...
1
vote
1answer
56 views

Multiplying two parametric solutions

I'm solving two (1-parameter) differential equations and I want to plot the product of their solutions, how do I do this? Here's the code, ...
0
votes
1answer
48 views

Issue with Table [closed]

I have a quick question about using the table command in mathematica. Suppose that I define ...
0
votes
1answer
67 views

List manipulation performance or how to make independent list copy

I have a task to solve some system of equations with NSolve and print graph of it, depends on parameters. Something like this (maybe it is not a good example and does not always have a solution, but ...
0
votes
2answers
121 views

Formatting the results from solving a differential equation

{{x[t] -> 600 (t + I π t - 50 Log[50] + t Log[50] + 50 Log[50 - t] - t Log[-50 + t])}} After solving a differential equation, I get an answer in a form where I ...
1
vote
0answers
37 views

Orthographic view (top,bottom,left,right,rear,front) and Isometric view using ViewMatrix [duplicate]

I want to know how to obtain the orthographic view (top,bottom,left,right,rear,front) and Isometric view using ViewMatrix. I read the ViewMatrix documentantion but couldn't figure out how to do it.
3
votes
3answers
114 views

How to apply ReplaceAll to denominator?

Here is the simple task. In reality, it's far more complicated, but it comes down to this. I want to take the expression $\frac{y}{x^2}$ and replace $x^2$ with $k$. This doesn't work: ...
0
votes
1answer
96 views

plotting sine of a wiener process and calculating derivative

How can I plot the sine of a Wiener process and compute its derivative? I only found the WienerProcess function in mathematica (version 9), but I'm not sure how to apply it.
11
votes
6answers
876 views

Integrate gives wrong results

Integrate[a/(Sin[t]^2 + a^2), {t, 0, 2 Pi}] $$\int_0^{2 \pi } \frac{a}{a^2+\sin ^2(t)} \, dt$$ gives $0$ This cannot be true. What is going on? If I insert a ...
1
vote
0answers
64 views

Problems with indexes in a Do-cycle and CoefficientArrays

I have a system of linear equations with variables $A_n$ and need its coefficients in a matrix form (Transform linear system into a matrix form). I'm trying to do that through a ...
2
votes
2answers
229 views

ContourPlot has weird Jagged line

I'm trying to make a series of contour plots, but pretty much everything I try (and I've tried many different equations) ends up with at least one jagged line of the form seen in the image. I don't ...
2
votes
1answer
116 views
0
votes
1answer
243 views

Bifurcation diagram for iterative map [duplicate]

I have a mapping function (cubic logistic map) f(x)=rx(1-x^2) and I need to make multiple bifurcation diagrams, showing stable equilibria and periodic orbits for 400 equally spaced r values ...
8
votes
2answers
566 views

How to solve the differential equation with Duhamel's integral?

How do I solve a differential equation with Duhamel's integral? I tried to solve it with NDSolve, but failed: ...
0
votes
1answer
105 views

Solve ${\rm BinomialDistribution}(x;\,n_1,\,p_1) = {\rm BinomialDistribution}(a-x;\,n_2,\,p_2)$ in terms of $x$ [closed]

I'm totally a novice with Wolfram software, so please forgive me if the question is nonsense. I want to solve the following equation in terms of $x$: $\quad \quad {\rm BinomialDistribution}(x;\,...
53
votes
3answers
3k views

Python-style plots in Mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...
2
votes
1answer
202 views

NDSolve doesn't work for this simple differential equations

I try to use NDSolve to do this partial differential equations, but the result is wrong... The source term is a Gaussian pulse as time and an exponential decay with the depth z. The result should be ...
1
vote
1answer
88 views

Interpolating a function of many variables

I am trying to interpolate a function of $5$ variables $$f[m,M,k,v,w]$$ by creating a 5D table of $n$ values in each dimension. ...
1
vote
1answer
66 views

ContourPlot not evaluating correctly

When I try to plot an evaluated equation with contour plot in Mathematica 9, but do so with a variable, the plot is empty, but when I input the evaluated equation itself, the ContourPlot plots ...
10
votes
2answers
251 views

Volumes of Revolution with detailed diagram

All, In calculus I have to do images such as the following in helping explain technique to students. This one is by rotating $y=\sqrt x$ about the x-axis, an image copied from Stewart's Calculus ...
1
vote
1answer
108 views

How to find the domain of an arbitrary function?

I got stuck here: fuu[x]:= 1/x +2x^2 Reduce[Exists[{x},fuu[x]],Reals] of course it doesn't work like this. How can i check if there will be divided by zero or if ...
45
votes
3answers
1k views

How can we make publication-quality PlotMarkers without version 10?

Suppose that for certain reasons we are not yet using Mathematica version 10, or we have a version with buggy PlotMarkers. It is well known that the default markers ...
5
votes
1answer
138 views

Unknown (internal?) function with `DSolve`

Bug introduced in 8.0 or earlier and fixed in 10.3.0 I am solving With Mathematica 10 the following ODE system: ...

15 30 50 per page