# All Questions

673 views

### Numerically solve 2nd order differential equation with singularity

Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example: $$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$ where ...
20 views

### MatrixExp[] of a complex matrix of size about 10000 by 10000

I used the MatrixExp[] of a numerical complex matrix of size about 10000 by 10000 and I also need high precision as I need to multiple several such matrices. It turns out to be out of memory during ...
768 views

### Integro-differential eqn with double integral

I am looking at the following variation of a integro-differential, with y[0]=1. The output is not great, any solutions to this? ...
12 views

### Differentiation inside pakage

I am trying to put all my functions in a single package and some of them do not work because of differentiation. Suppose I have the following package ...
40 views

### I keep writing functions like this one: subtract[{a_, b_}] := Subtract[a, b] [duplicate]

(Edited to provide an example) Recently I have found myself writing silly functions like the following, which is just a new arity of Subtract in which the arguments are inside a list. ...
26 views

### Colors on a 3D curve not working

I'm having troubles applying colors to a simple 3D curve plot. Here's the code : ...
25 views

### How to define a number of infix operators with predefined relative precedences

Reading a number of questions about infix operator notations I want to ask if somebody could reimplement the problem below in a simpler way, say modifying ...
10 views

### Trying to find parameters for a system of ODEs

So I have a system of 4-dimensional system of ODEs and I'm trying to find any values of parameters that satisfy properties I need. In this picture, I want two basins of attraction, one of which the ...
57 views

### NDSolve There are fewer dependent variables, {V[S,t]}, than equation

I am trying to solve the BlackScholes PDE for Barrier option. It works fine for european barrier, but errors out on american boundary condition ...
100 views

### intermediate steps of a Mathematica operation

How to make a multiplication or division, the intermediate steps. The numbers can be rational - decimals? it seems the OP merely wants Mathematica to show him how to multiply and divide the way ...
15 views

### Selecting the parallel kernels where tasks can be executed

When I use ParallelSubmit, is it possible to select on which kernel a task can possibly be executed ? For example if have 3 parallel kernels, can I only use 2 of them so that one is remaining in case ...
264 views

### How to improve visualisation of trajectories in 3D space

I have a list of trajectories from a bunch of photons that travel inside a scattering medium. Each trajectory is a list of $(x,y,z)$ pairs. I'd like to visualise them in 3D space. I came up with the ...
54 views

### Adding extinction factor to Monte Carlo analysis

I'm looking to add an absorption component to this Monte Carlo analysis, essentially I want there to be a 1% chance that a photon gets absorbed at each event as it travels through the medium, once the ...
337 views

### Summation of If statements

The following made me curious. Suppose you want to sum the if statement If[x[i] < 1., x[i]^2, 0.] over i=1,2, i.e. ...
46 views

### Is this behaviour, producing OutputSizeLimitDumpencapsulateOutput, a bug?

Bug introduced in 6.0.0 and persisting through 10.2.0 The input ...
21 views

### Real time solution of a DE with changing parameters

I have a set of coupled differential equations (9 equations with 9 unknowns) and 9 known initial conditions to describe the motion of a quadcopter. Question: how can I make a real-time simulator out ...
21 views

### Associations - getting values according to a key pattern

I want to get all counts of trigrams that with "th" (or any other given digram). ...
140 views

### Trouble with polynomial multiplication

Bug introduced in 10.1.0 and persisting through 10.2.0 or later ...
817 views

### How is + as an infix operator associated with Plus?

How is + associated with Plus? Suppose I want to define a head FooBar and have it ...
16 views

### How to import a Graphs & Networks graph as a Mathematica graph?

This graph (as a picture) is given below: I am wondering rather than setting up this network graph using Mathematica syntax such as PathGraph,...
279 views

### How to implement the sample-point process like the built-ins of Mathematica?

Considering that pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {4, -2}, {5, 1}}; f = BSplineFunction[pts] Then I can use ...
60 views

### Program to demonstrate rotation according to quaternion values

On the Wolfram|Alpha website, I type quaternion(1,1,1,1) into the search field. Wolfram|Alpha shows a 3D transformation of the quaternion values representing the orientation of an object. I have 9 ...
30 views

### Gradient Help w/ Problem 1 [on hold]

​Go with f[x, y, z] = Log[3 x^2 + y^2 + z^2] In which direction should you leave the point {2.1, -3.7, 4.3} to get the ...
141 views

### Global context not empty at startup in v10.2.0

Bug introduced in 10.2 and persisting through 10.2 or later Note that the analysis of this problem revealed a different problem than in Potential pollution of Global context in fresh kernel (see ...
147 views

### Number of divisors visualized with the QPochhammer function, how improve performance of code?

I have this code that is originally Jeffrey Stopple's code for the Riemann zeta function in the complex plane. Because I discovered yesterday that the number of divisors can be generated with the ...
575 views

### Only final result from NDSolve

Finally I started to play with differential equations in Mathematica. And I have faced the problem, which seems too me so basic that I'm afraid this question is going to be closed soon. However, ...
43 views

### thickness of plotting edges

used these codes to might a simple triangle, which nodes have different effects each other: ...
16 views

### Custom drop-down list of tags for Dataset Keys similar to CountryData

CountryData produces a drop-down list of tags when you enter a string. I would like to replicate this functionality for a ...
332 views
+100

### Returning multiple results from a LibraryLink function

What is the best way to return multiple inhomogeneous results from a LibraryLink function? Imagine that the result of a single computation is several tensors of different dimensions and several ...
181 views

### Possible bug with FourierTransform linearity

Each component is easily transformed but the sum is not: FourierTransform[f''[x], x, k] FourierTransform[f'[x], x, k] ...
77 views

### How to find a cycle with a property in a graph

Let's have a graph with this edge list: edgelist = {s -> 1, s -> 2, 1 -> 3, 2 -> 1, 2 -> 4, 3 -> 2, 3 -> t, 4 -> 3, 4 -> t}; I want ...
476 views

### Efficiently compute double sum

Is there a "Mathematica Way", like Map or Apply to compute the following double sum? $\sum_{i=1}^{N_1}\sum_{j=1}^{N_2} m_i n_j \, f(\tau_{i} \gamma_{j})$ I have already stored the lists ...
77 views

### How to get the desired (equivalent) answer from Integrate?

This is the integrand: 1/beta/(2*z)/(1 - beta) // TraditionalForm Integrating with respect to z, gives ...
571 views

### Where is the “Function Navigator” and “Virtual Book” gone?

Under V9 "Help" was a Item each for "Function Navigator" and "Virtual Book" to find and one could work with it. Under V10 these Helpers are gone. Although under Documentation/English/System the ...
197 views

### Trouble with Position[] [duplicate]

I am in trouble with Position, Although my example works as expected it throws a warning. Position[{{a,b},{a,c},{a,b}}, _?(#[[2]]==b&), {1}] During ...
110 views
+50

### What's the difference between Interpolation[pts, Method -> Spline] and BSplineCurve?

Last month, I answered a question about spline interpolation,please see here Now I do the following operations ...
345 views

### Interpolation on a regular square grid spanning a triangular domain

Bug introduced in 10.0 and fixed in 10.1 Context I am trying to identify contours of a function which is sampled on a cartesian grid within an irregular (triangular) region. Here is the data ...
68 views

### upper limit with PlotStyle in GeoListPlot in v10.1

Bug introduced in 10.0 and fixed in 10.2 Let's start with the code below: ...
39 views

### “Part specification is longer than depth” warning in Position function [duplicate]

I'm working on a project which analyzes financial data. I download the price and dividend information for the SPY ETF which tracks the S&P 500: ...
130 views

### Difficulty using LUDecomposition

I'm having trouble using LUDecomposition with pivoting. I read the Mathematica help on this particular command, but I'm still lost. Take a matrix like: ...
59 views

### JacobiCN inaccuracy [on hold]

For my calculations I need JacobiCN[s,k] for s near 0 from the left and k near 1 from the ...
57 views

### Same scale for all the axes in Plot3D

I can't find this in the documentation. How do you force the same scale for all the axes when making a 3D plot? There is the BoxRatios option, but this only changes ...
77 views

### Displaying a list of percentage values according to their classification

I have a list of percentages as follows: percent = {21.15, 42.3, 57.68, 73.06, 84.6, 90.37, 96.14, 99.99, 99.99, 99.99, 99.99} I want to classify these ...
45 views

### Numerical integration with assumptions

I have to numerically integrate an integral with two variables r and v, but I want to do the evaluation assuming ...
2k views

### Playing with Matrix falling code in Mathematica

I was trying to create a Matrix falling code image with Mathematica. Here is my code: ...
347 views

### Mathematica Implementation of Householder’s Method

I typed the Householder code in this paper, which starts on page 7. The code is: ...
599 views

### How to implement Kemeny-Young method? (rank aggregation problem)

Prehistory I am trying to make some statistical analysis of some experimental data, arises from measurements made ​​on an ordinal scale. I faced with the problem of rank aggregation: to get from ...
146 views

### step by step interactive indefinite integral

WolframAlpha can give step by step solution for indefinite integral. There seems to be similar question but for derivatives. Is there a way that I can generate my own step by step solution for ...