4
votes
2answers
38 views

Archimedes' Scheme to find $\pi$

Given an Archimedes' scheme $$a_{n+1}=\frac{2a_nb_n}{a_n+b_n}$$ $$b_{n+1}=\sqrt{a_{n+1}b_n}$$ with initial values $a_0=2\sqrt{3},b_0=3.$ How do I prove using Mathematica that this converges to ...
4
votes
1answer
450 views

Is there a method to send different Cell evaluation to different core?

I am running Mathematica on a computer with multi CPU and every CPU has multicore. I am wondering if there exist a method to send different cell evaluation to different core? So if I already have a ...
0
votes
0answers
24 views

Force NDSolve to use finite difference

How to force NDSolve to use finite difference instead of FEM. I have the following code: ...
0
votes
0answers
4 views

Mathematica doesn't save my work

When I save my work and close Mathematica, usually it's not saved, it won't save a my work,despite that it asks where to save the file. Sometimes it creates an empty notebook only.
6
votes
3answers
173 views

What's wrong with naming a rule?

Please have a look at the code below. The second Manipulate uses the name rl of the replacement rule given in the first line, ...
2
votes
1answer
37 views

How to enlarge a specific part of a graph using Plot Command?

How to enlarge the closed curves of any Graph and Show them in a separate Graph within the ...
0
votes
0answers
10 views

How to evaluate this function with Gauss-Hermite quadrature?

The PDF of a random variable $X$ is given by $$f_X(x)=\frac{2m^mx^{2m-1}}{\sqrt{\pi}\Gamma(m)}\sum_{i=1}^{N}w_ih(t_i)$$ with $$h(t)=\exp\left(-m\left(\sqrt{2}\lambda ...
0
votes
1answer
13 views

Why cant mathematica solve this non linear (fractional) ode?

a1 = NDSolve[{y1''[x] - 0.1 y1[x]^0.25 == 0, y1'[0] == 0, y1[1] == 1}, I get the following errors - Power::infy: "Infinite expression 1/0.^0.75 encountered ...
0
votes
0answers
22 views

code indent issue in frontend: How to remove annoying space at beginning of a line

I am using MMA 10.4.1 Very often I encountered this problem This is an extraction of a Module (the last bracket is matching module). The ...
7
votes
3answers
147 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
0
votes
0answers
46 views

Nested Tables and List Plot

Take two matrices which depends on three parameters i1,i2 and i3 m1 = {{i1, 0, 0}, {0, i2, 0}, {0, 0, 0}} m2 = {{0, i1, 0}, {0, i2, 0}, {0, 0, i3}} I am using a ...
2
votes
0answers
14 views

StringSplit acting weird on a String in StandardForm

To begin, this is my first post on stack exchange, so if my question is not up to par please let me know so I can make the appropriate edits. Now for my question: why is it that parsing a string in ...
0
votes
2answers
50 views

Applying a window over a list

The window functions state that they tread over lists, but when I try to do: HammingWindow/@list, I do not get the expected results. What is the best way to apply a window over an arbitrary length ...
0
votes
1answer
32 views

Using SystemDialogInput in a Manipulate expression

I want to add the select directory function in a user interface such as: ...
0
votes
1answer
35 views

Find the minimum element of a row of a matrix and its column index for each row

I am trying to find the minimum value of a row of a matrix and its corresponding column. For instance, I have three functions: ...
6
votes
3answers
246 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.
18
votes
1answer
439 views

Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
1
vote
0answers
29 views

How to implement reusable graphic components having stable line thicknesses?

IMPORTANT: This post is a follow-up to Scaling edge thicknesses, and in particular to the accepted answer in that thread. Basically, I'm trying to use the idea given in that answer to implement ...
0
votes
1answer
17 views

min distance in a graph

How would I find the min distance between two vertices in a graph. What function should I use? For example, in the above, $d(2,4)=2$ and $d(2,3)=1$
0
votes
1answer
55 views

Boundary conditions for NDSolve

I get the following message: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> from ...
0
votes
0answers
20 views

Value Iteration (Recursive iteration) to Minimize (Optimize) a Function

I have a function that I call as "Value". I am trying to find the minimum of this function and this function is a function of 4 other functions. One of these four functions is recursive based on the ...
9
votes
3answers
123 views

Find duplicates in list of InfiniteLine

MMA 10 introduced a new function, which can be very convenient: InfiniteLine. Of course, two infinite lines can be described by different arguments: for example ...
4
votes
1answer
92 views

Evaluating standard functions of general quaternions symbolically

Mathematica can easily compute exponentials and logarithms of concrete quaternions: ...
3
votes
1answer
73 views

Modeling chemical reactions: can Mathematica tell the end result of a reaction?

I am curious about using Mathematica for modelling chemical reactions but don't really know much about the Mathematica software yet. So I was reading this page at wolfram.com which explains some of ...
4
votes
1answer
68 views

FInding outliers in multiple dimensions

I'm working on dataset which isn't normally distributed.which contains three dimensions like cost, discount and profit I'm trying to find outliers in all these dimensions. I used z score to find ...
1
vote
1answer
49 views

Mirror image of a point about a line

How can I calculate the mirrored position for a point in 2D space? I know the xy-coordinates of the two points which define the vector. I also know the coordinates for the yellow point which I want to ...
10
votes
3answers
3k views

Mapping a pure function with multiple slots [duplicate]

Here is a pure function with multiple slots: (#1^2 + #2^2)&[3, 4] 25 But how can I map that pure function over lists of values? For example, say I want ...
2
votes
0answers
28 views

why do python modules load differently via mathematica?

its a steep learning curve trying to integrate mathematica with python's modules/library. I am using a Rapberry pi 3 with mathematica's wolfram command line. I know little about both platforms (so ...
2
votes
0answers
87 views

What is a good way to model fluid stream contours around airfoils?

I am an undergraduate student and am doing a project on conformal mapping for my complex analysis class. I have had one heck of a time trying to plot stream function contours to model fluid flow in ...
2
votes
1answer
46 views

Projection of a 3d curve to 2d

This question is related to: How to obtain the coordinates of the intersection line of two surfaces? Read the link first. First, I have tried ...
7
votes
0answers
49 views

RandomInteger: speed with long lists

I noticed an interesting effect with RandomInteger when looking at the time to create 10^8 random integers. The following code lines all take about 0.5 seconds on a ...
1
vote
1answer
45 views

Getting raw data using DcRaw

I'm using dcraw program to import raw image data to Mathematica. When I use Run["dcraw -4 -D -T "image.nef"] (which converts it to an unprocessed linear TIFF file) ...
1
vote
0answers
53 views

Creating package and encoding for CDF and Path for Mathematica

I am working on learning Enterprise CDF development. I developed a simple example. I am working with packages for I can encode my codes eventually. When I use Needs command and save the package in one ...
3
votes
3answers
111 views
1
vote
1answer
132 views

How do you solve a linear equation of matrices?

The function Solve works fine for scalars: In[]:= Solve[A x - x B + C == 0, x] Out[]= {{x -> -(C/(A - B))}} When using matrices however, ...
1
vote
2answers
109 views

How to do a parametric histogram?

Is it possible to draw a spectral histogram from two random sets ? More specifically, I have these two random functions (fmin, ...
0
votes
0answers
34 views

Eigenelements of conductivity equation

I am trying to calculate the eigenvalues and eigenfunctions of the conductivity equation in an annulus. In particular I am looking for $(\lambda, u)$ s.t. $$ \begin{cases} \Delta u = \lambda u & ...
-1
votes
1answer
44 views

CompiledFunction::cfsa Argument x at position1 should be a machine-size real number [on hold]

I have a compiled function: g:=Compile[{{x, _Real}},...] and call g through an interim function: g2[x_?NumericQ] = g[x] If ...
4
votes
1answer
42 views

Why is `FindCycle` crashing for this graph?

I'm working with a directed graph, previously mentioned in Exporting a high-resolution GraphPlot of a very large graph (65,536 nodes). It can be generated with the following code: ...
1
vote
1answer
70 views

Evaluate pure function through round brackets

In have some matrices of pure functions or numbers which I multiply by other matrices or vectors. I would like the functions to be evaluated in the result, but all that I get is something like this: ...
-2
votes
0answers
62 views

unordered lists with maximum dispersion [on hold]

As you can implement the following I have a list $$L = {p1, p2, p3, p4, p5 ........ pn}, n <50$$ I need cluttering and print this list 4 ...
8
votes
0answers
109 views

Exporting a high-resolution GraphPlot of a very large graph (65,536 nodes)

Problem I have a very large graph of 65,536 vertices. GraphPlot yields: But the vertices are too dense to see in any detail, and attempting to use any of the ...
2
votes
1answer
98 views

Seeing coordinates in Graphics3D

I'm writing some structures built up from different strings that specify the coordinates of the lines. The code used to generate these is built up from a ton of user defined functions from my library, ...
1
vote
3answers
228 views

Find all roots of a function with parabolic cylinder functions in a range of the variable

I want to find all roots of a function involving Parabolic Cylinder Functions. In what follows, I define 2 variables $\xi1$ and $\xi2$, which in turn depend on $\omega$. My function is then defined as ...
3
votes
2answers
115 views

Definite integration in mathematica

I tried to integrate the following in Mathematica. $\int\limits_{-\infty}^\infty\cfrac{\text{e}^{\text{i}ax}}{x^2-b^2}\text{d}x$ where $a,b>0$ The analytical result is well known. ...
7
votes
1answer
135 views

Is it possible to get the (x, y) position of nodes in a `Graph`?

Given a graph... RandomGraph[{20,40}] ...is it possible to retrieve the (x, y) coordinates at which the nodes are drawn? ...
1
vote
2answers
58 views

Recreating a ContourPlot3D using points

Let's define a three-dimensional surface ...
0
votes
0answers
22 views

PolynomialExtendedGCD in 2 variables

Consider a field $R$ and the ring $A=R[y]$. Consider two polynomials $g,h\in A[x]$. I want to obtain $d=\gcd(g,h)\in A[x]$ and two polynomials $s,t\in A[x]$ satisfying the Bézout relation: $sg+th=d$. ...
4
votes
1answer
82 views

How can a function without an operator form be used in postfix form?

As an exercise, I was trying to convert the following Clojure code to Mathematica: ...
0
votes
0answers
42 views

Factoring an arbitary variable in mathematica

Imagine we have a equation like this ...

15 30 50 per page