# All Questions

100 views

### Inconsistent handling of Dynamic option values; intended, omission, or bug?

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be ...
107 views

### Factor out imaginary unit of root of obviously negative term

Suppose I have the term $t=\sqrt{-a^2-b^2}$, where $a,b\in\mathbb R$. Of course, we know that it holds $$t = \mathbb i \sqrt{a^2+b^2}$$ which is (in my opinion) more convenient. How can I get ...
125 views

### Residue failed to reproduce this residue in a paper

This problem is a more clearly state of my original problem which is off topic, so I reconsider my problem carefully based on previous discussions, and gives the following valid code to reproduce my ...
92 views

### Group matrix values by column [closed]

Original Question: I have a list {{a, 1}, {b, 3}, {c, 1}, {d, 2}, {e, 3}}. I want to be able to group the the first number in each pair that has the same second ...
59 views

### Why is FindRoot failing to evaluate this function? [closed]

I have a (somewhat long) script which runs cleanly until the very last stage. Here, I'm using FindRoot to attempt to parameterize implicit curves in the zero set ...
365 views

### How can I evaluate a certain kind of summation?

I have the following sum P0, P1 and P2 are constants. The problem is to assign all ...
63 views

### Error message when running NDSolveValue

I am trying to solve a set of differential equations but keep getting an error. See message below "NDSolveValue::ndnum: Encountered non-numerical value for a derivative at t=0" The system that I ...
56 views

### Integral of $(\sin x)^3(\cos x)^3$ [closed]

For the integral of (sin x)^3(cos x)^3 I got 1/6(cos x)^6 - 1/4(cos x)^4 + C. This seemed to work but my book had 1/4(sin x)^4 - 1/6(sin x)^6 + C. This is similar to what I got but instead of cosine ...
124 views

### How to plot an Eddington-Finkelstein diagram

I need to plot the same thing as what is shown on the third picture of the site below (sorry, I'm unable to poste that picture here) : http://ion.uwinnipeg.ca/~vincent/4500.6-001/Cosmology/...
54 views

### Numerically parameterize portion of $F[x,y]==0$

I have a relatively complicated function of two variables F[x,y] whose zero locus contains a number of intersecting paths in the $x,y$-plane. A problem I've been ...
61 views

### Why does Expectation function compute, while explicit integration does not?

The code: Expectation[1 + 1/y, {y \[Distributed] ExponentialDistribution[1]}] outputs 1 - EulerGamma While, ...
103 views

### Calculating density of states from lists of momentum/energy data

I am trying to calculate the density of states for a 2D system given certain band structure data organized in a specific format. Below is an example of my procedure: Beginning with a simple 2 x 2 ...
128 views

### NDSolve and differentiation of Abs

I have found several questions about the derivative of Abs and how it is not defined in the complex plane. What I have not found yet is a precise and simple ...
432 views

### $3D$ graphic of soccer ball

How to make a soccer ball $3D$ graphic? The following image is from Wikipedia, Spherical polyhedron: Truncated icosahedron (left) and standard soccer ball (right) ...
91 views

### ArrayPlot gives wrong plot legend, how to fix?

Bug introduced in 10.0 and persisting through 10.4.1 My minimal working example is the code ArrayPlot[{{1, 0.1, 0}, {0.1, 0, 0}}, PlotLegends -> Automatic] ...
41 views

### Issues with Functions Defined as Eigenvalues [closed]

I have to calculate eigenvalues of 4 different matrices. The code I'm using is below, but essentially three out of the four are working with no problem, and one (the eigenvalues I've defined as y) ...
100 views

### Speeding iterative computation

I want to get the following iterative sequence ...
5 views

### How to derive a Taylor series from the ones we know (cosx, sinx, …) [migrated]

If we know the Taylor expansion for the cos(x) function around 0, how can we use it to derive the Taylor expansion of a similar function (cos(x+π/4)) around 0? I do know how to get the Taylor series ...
57 views

### How to use quantities obtained by solving equations directly to plot

I want to know how we could use the quantities we found by solving simultaneous equations, directly into plotting graphs. For example I have this Mathematica code; it gives the values of ...
181 views

### Alternatives to For/Do Loop to optimize indexing Matrix

I am trying to optimize my code that searches for elements in the rows of matrix that are greater than 0. Then use that position to grab the element from other matrix. I use the do loop to iterate ...
15 views

44 views

### How to sum over half integers? [closed]

I have an expression of the form Sum[1 + x^n + x^(n^2/2), {n, 0, 10}] but I want to sum over half integers, that is, I require that $n \in \mathbb{Z}+\frac{1}{2}$ ...
63 views

### How can I generate a graph from a NetworkX JSON

I have done some network generation and analysis in Python NetworkX. I do most of my visualizations with D3, but for publications I would like to generate some graph plots with Mathematica as well as ...
157 views

### Operation with lists

I have created this code and was wondering if you could suggest a less convoluted way of solving the problem. I have two lists: ...
81 views

### How to apply DiscretizeGraphics to a tube?

I want to export the numerical solution of the Chan-Lee oscillator as an STL file so that I could print it out. But when I expanded the curve into a tube, ...
67 views

### Atom weight in SI units

In chemistry is very common to use the units grams/mol for the atomic weigth, so the mass of one atom (of Tin, for example) is calculated as : massOfOneAtom = (0.11871 (Kg/mol))/(AvogadroConstant (1/...
117 views

### How to fit this model [closed]

I have such data ...
144 views

### Problem of calculating the residue of a expression (to confirm the result from a paper) [duplicate]

I use Mathematica to confirm a result from a paper which is to calculate the residue of a expression at zero. The code and result are given below. Is this residue too complicated for Matheamtia or ...
72 views

### Testing Framework applications in the FrontEnd area

I understand that user interaction with GUI can't be tested automatically but some things can be tested using low-level notebook programming functions. Are there any guidelines or limitations of using ...
240 views

### How to double elements of a list given by their positions

Given that I have a list $\{P_0,P_1,P_2,\cdots,P_7\}$, where, $P_i$ is a real number or a list like {x,y}/{x,y,z}. Now I would like to double some elements ...
38 views

### How to tune Dynamic properly to accomplish this?

I'm making a words remembering program with Mathematica. I almost finished it but I need to implement a dynamics to make it more beautiful. Try the following code: ...
21 views

### How can I generate points according to a certain Probability Distribution or Probability Distribution Function? [closed]

Here Dist is the distribution of some Barndon variable. I need to generate points, lets say 100 points that follow this distribution it. Can someone suggest me a ...
82 views

### Plot graph with complex number

I need some help from expert. I already read about the plot with Identity, I but I not really understand and I think my problem is different and I confuse to used what command of plot. Here the ...
42 views

### How can I evaluate a line integral? [closed]

Can I compute a line integral with Mathematica? I have tried entering the t values into my expression, but I am not getting an answer. For example: ...