11
votes
4answers
572 views

How can I find all values of $m$ such that my cubic equation has three different positive solutions?

I want to find all the values of $m$ such that the equation $$-m^3 + 2 m^2 x + (-2 m - 1) x^2 + m + x^3=0$$ has three different positive solutions. I tried ...
28
votes
2answers
845 views

Is there a name for #1@#2&?

Why does the pure function # @ #2 & have no name? I'm asking because sometimes I find inelegant to write expressions like ...
3
votes
3answers
216 views

Speed up Eliminate

I have a set of trig equations, c1,c2,c3 are constants, I excepted the result is c1 c2 c3 r^2 + (c1^2 + c2^2 + c3^2 - 1) r + c1 c2 c3 == 0 but following code ...
1
vote
0answers
193 views

How can I access Mathematica kernel for WebMathematica in Linux(Ubuntu 12.04)

I have been working in webMathematica with Application server(Geronimo 3.0.1) in windows, It was working fine. Recently I have changed to Linux(ubuntu 12.04). I ...
0
votes
0answers
199 views

How can I solve my non-linear ODE?

DSolve[{-x^2 + y[x]^2 - 2 x*y[x]*y'[x] + 2*x^2 *y'[x]^2 == a^2}, y[x], x] DSolve is returning the input statement unevaluated. ...
4
votes
1answer
374 views

Manipulate Plot and control variables using multiple controls

Here's a simple Manipulate example: ...
2
votes
0answers
121 views

Frontend cursor movement speed depends on the position in large notebook file

I run Mathematica v9 on my Atom laptop (don't ask) and I got used to the fact that everything is slower. Except for one annoying thing: cursor movement (in text) is slower than the keyboard key repeat ...
1
vote
0answers
113 views

How to insert a function into OptionsPattern?

I’ve written a function TableauForm to draw a standard Young Tableau. This problem is related to this one, however, the difficulty is that, a function has to be applied to the list in my case. This ...
1
vote
1answer
222 views

FindRoot equation-variable mismatch

I cannot figure out why FindRoot doesn't work and returns this error: The number of equations does not match the number of variables in ... My problem: drawing ...
5
votes
2answers
1k views

ContourStyle for a particular contour line in ContourPlot

I have the following command: ContourPlot[(-1 + x)^2 (-1 + y) + x^2 y, {x, 0, 1}, {y, 0, 1}, ContourLabels -> True] which gives me I want to highlight the ...
1
vote
0answers
187 views

webMathematica on Linux

I have been using Mathematica and webMathematica (with application server) in Windows and it was working fine. Recently we changed to Linux, so I have to install both Mathematica and webMathematica ...
3
votes
1answer
510 views

How do I solve $1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x))= 0$?

Consider the equation $$ 1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x)) = 0 $$ where $A,B \in \mathbb{R}$ are constants. What is the analytic solution?
1
vote
1answer
118 views

About evaluation in Block

I'm completely puzzled by the following codes: Clear[func, f] a = x^2 + z; func[k_] := Block[{f}, (f[x_] := Evaluate[(a /. {z -> k})]; f[1])] func[2] ...
1
vote
1answer
251 views

Pseudo-code for rules of probability?

I am having a hard time in Stats understanding some basic rules of probability and set-theory, namely $P(A|B)$, $P(A\ \textrm{and}\ B)$ and $P(A\ \textrm{or}\ B)$ where $A$ and $B$ depend on each ...
3
votes
1answer
644 views

A rotation-like transform on a matrix

Do not be confused with comments, those are for previous version of the question - Kuba Imagine I have a matrix of the form: ...
1
vote
1answer
92 views

Techniques To AutoReplace Browse

Let's say I have a function of the form. Test[File_,text_] What would be the most automated way and flexible way to generate an input cell of the form, such ...
1
vote
1answer
185 views

Changing ParametricNDSolveValue options for only part of the run

Here is an example of the system that I am running, ...
4
votes
1answer
156 views

DeleteCases vs. DeleteDuplicates for removing points within a critical Euclidean distance

I'm attempting to remove all points in an array which are within a Euclidean distance "ThresDist" of one-another. Using the command: ...
1
vote
1answer
316 views

Selecting morphological components, of a certain size, centered on points of interest in an image

I have a set of points in an image, for example: ...
2
votes
1answer
152 views

Strange behavior when replacing variables by numerical values [duplicate]

I have a rather complicated function with parameters {a, b, c, d, e, f, k}, and I'd like to know its behavior as a function of k alone given other parameters, so I try the following code: ...
3
votes
1answer
268 views

Connecting to remote kernel on iMac from a MacBook Pro client

I am having trouble setting up a remote kernel connection between my two Mac computers. The kernel on my iMac runs much faster than on my MacBook Pro, so I would like to run computations through my ...
5
votes
1answer
472 views

Plot the boundaries of each piece of a piecewise function

I'm wondering how to plot the boundaries of each piece of a bivariate piecewise function. Lets take for instance the following piecewise linear function $B_{111}(x,y)$: ...
2
votes
2answers
532 views

Problems with BarLegend in MatrixPlot

I have the following data: ...
4
votes
2answers
957 views

Can I define a function for vectors of arbitrary dimension?

Is it possible to do analytic calculations with Mathematica? For example, I want to compute: $$\partial \frac{\sum_{j=1}^n G_{j} \prod_{k=1}^{j-1} (1 - G_{k})}{\partial G_l}=-\prod_{k\neq l} ...
4
votes
1answer
199 views

Change CurrentValue of a key press

I was wondering if there is a way that I could change the value of a key press such as Shift, Ctrl, etc. Normally, when nothing is pressed, the CurrentValue will ...
6
votes
1answer
3k views

Hilbert-Huang transform package

I am trying to learn Hilbert-Huang transform (HHT) and its applications (especially in ECG signal processing). There are several HHT packages (scripts) HHT for R and Matlab. Is there any known ...
5
votes
2answers
238 views

How to group lists that own one common element?

I have produced a list of sub-lists by the following: ...
1
vote
0answers
139 views

Network problem of visualization of vertex

I have a question about visualization of network in Mathematica: for example: for this network g = ExampleData[{"NetworkGraph", "Friendship"}]; when we ...
2
votes
1answer
236 views

Expectation function does evaluate my expression

I am trying to evaluate the expression Expectation[(B x (-6 b + 12 a n0 + B x + B^2 x^2))/(2 (6 a + B x + B^2 x^2)), Distributed[x, BetaDistribution[α, β]]] ...
5
votes
4answers
241 views

Picking numbers within a list with an interval of 60

I have a list of integers from 1 - 400. I choose n random numbers with replacement from the list. Here is an example: ...
2
votes
1answer
356 views

Problem with Covariance Matrix Output in NonlinearModelFit

I am running NonlinearModelFit based off of some simulated data and trying to fit to a function with more than one parameter. Eventually, I would like to fit to 5 ...
1
vote
0answers
79 views

what is the difference between these definitions? [duplicate]

I define 2 functions: g[s_][x_,y_] := the gaussian (1) g1[s_,x_,y_] := the gaussian (2) I get the same answer using ...
9
votes
2answers
342 views

Intersection for lists of numeric data

I know that Intersection is a pattern matching function and will not evaluate list elements to determine if two or more list have equal elements. So my question is, ...
5
votes
1answer
212 views

Using the keyboard to interactively and dynamically specify coordinates in a grid (a la Battleship board game)

In Mathematica, it is possible to create a Table or Grid of \[Placeholder] boxes. For ...
3
votes
1answer
217 views

Importing numerical values from a PDF file

I need the numerical values from pdf files like this one. When I use the usual Import command, the PDF imports, but pages of images. How can Mathematica be used ...
0
votes
2answers
166 views

Unexpected complex roots from solving a cubic

I am new to Mathematica and there is a behavior that I don't understand. When I insert the code: Solve[-(x - 2)^3 + 10 x - 10 == 0, x] I obtain: ...
3
votes
1answer
387 views

How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?

I want to solve two coupled equations with NDSolve, ...
2
votes
2answers
163 views

Trigonometry expansion of a product

The following command does what I want: ...
0
votes
0answers
104 views

Optimization for complex inequalities

I want to check when the expression $$ \sqrt{\sqrt{\lambda^{2}\left(2E+\lambda^{2}\right)}+E+\lambda^{2}} $$ is real, when it is purely imaginary and when it is complex (with imaginary part not ...
3
votes
2answers
440 views

Optimization problem with matrix positivity constraints

Is it possible for Mathematica to parametrically find a local minimum of a given function (say of some variable $x$ where $(a,b,c)$ serve as parameters) subject to the constraint that a given ...
1
vote
0answers
180 views

Variable scope in nested NMaximize, NMaxValue

I'm trying to use NMaxValue inside other statements (FindRoot and NMinimize). Those statements should bind variable names, but I'm getting weird warnings which seem to indicate that the variables ...
1
vote
1answer
860 views

Computing the fundamental matrix and its monodromy matrix

Assume $\dot x(t)=v(x,t)$ is a $T$-periodic, with respect to $t$ dynamical system. That is: $x\in\mathbb R^n,\quad t\in\mathbb R,\qquad v(x,t+T)=v(x,t)$. Let $x_0$ be a smooth periodic solution in ...
5
votes
1answer
336 views

Using MathKernel without echoing a window

I use M9 under windows 7 on a command prompt as: MathKernel -noprompt -script file.m On execution, there is a like a kernel window opened and then closed immediately. How can I avoid this window and ...
0
votes
0answers
133 views

How to add labels to a graph [duplicate]

This should be an easy question but since few examples are given for ShowLegend and I am a new user, I got stuck after many attempts. I plot three graphs which are ...
0
votes
1answer
833 views

How to neglect higher power terms in a polynomial expression

I have a polynomial expression of order n (say n=20). F(x)=1+x+x^2+x^3++...x^20. I want to approximate the polynomial for order 3 only. So I need to make the ...
1
vote
1answer
152 views

Manipulate doesn't work for plotting a region where a matrix is positive semi-definite

I'm facing the following problem and would very much like you help. Thanks is advance! I have defined the following 4x4 matrix: \begin{equation} S=\left( \begin{array}{cccc} ...
-5
votes
1answer
372 views

random number visualization without generator (Spectral Test)

Does anyone have codes for using only numbers to make this kind of random-number visualization and not requiring a number generator? ...
6
votes
2answers
369 views

Pruning elements in an array based on the existence of similar elements in adjacent arrays

Imagine I have a series of particles floating around in $\mathrm{R}^3$, where, at any given time, particles can pop into and out of existence. Here, for some number of time points, $(t_1, \dots, ...
5
votes
3answers
462 views

ContourPlot and Colorfunction

I have the following code: ...
1
vote
0answers
75 views

ReadList with type Expression unable to read scientific notation? [duplicate]

I have a file that defines an array of numbers like this: freq["AQs"] = 8.846947803007962E-4 ... I am reading the file with ...

15 30 50 per page