6
votes
1answer
122 views

LinkSnooper troubles on Windows

I'm trying to get LinkSnooper up and working on a Windows 7 machine to monitor the interaction between the Mathematica front end and MathLink. I'm facing great troubles following the instructions ...
5
votes
1answer
234 views

Prove an identity in quantum harmonic oscillator

Problem: In the context of quantum harmonic oscillator the eigenfunctions are given by: $ u_n(x) = (N_n/\sqrt{b}) H_n(x/b) \exp\left[-x^2/(2b^2)\right] $, where $N_n$ is the normalization factor: $ ...
0
votes
0answers
43 views

Store results of inequality [duplicate]

I eveluated some values using Reduce commend and I store them in a Table ...
3
votes
2answers
290 views

Manually adjust graph vertex location by dragging?

Sometimes I have a graph and I want to make tweaks to the vertex locations. Is there any way to manually adjust graph vertex location by dragging? If I double click to edit, I can move around the ...
5
votes
0answers
118 views

How to keep $FrontEnd options from resetting?

I'm trying to get Mathematica to look in a different, version-tracked folder for the 'TextResources' files that it uses to build the Front End. I've prepended my version-tracked folder path to the ...
2
votes
1answer
257 views

calculating a sequence of functions using iteration

I am trying to compute a sequence of functions using iteration and keep running into problems trying to use built in looping commands because of the recursive nature of the definition. The code below ...
5
votes
2answers
304 views

Manipulation of InterpolatingFunction

Suppose that $q[t]$ is obtained by NDSolve as an InterpolatingFunction, and I want to define $Q[t]$ to be some function of ...
2
votes
0answers
64 views

No Symbols Matching $InterfaceEnvironment

I'm running a webMathematica server (running Mathematica 9) and am getting some weird stuff in the log - specifically, I keep getting the following message: ...
1
vote
1answer
258 views

Vertex labels versus vertex names in VertexRenderingFunction

The VertexRenderingFunction seems to only use names, not labels. For example: ...
8
votes
7answers
779 views

How to partition a list in a specific way

I have a list: a = {{1, 2, 3, 4, 1, 2, 3, 4}, {5, 6, 7, 8, 5, 6, 7, 8}}; Using Partition and ...
2
votes
1answer
143 views

Solving problems with the floor function

I've got the following problem: If I want to calculate the following equation, ...
2
votes
2answers
177 views

Plotting double inequality only for integer values

RegionPlot is plotting for all values. And using ListPlot I can only evaluate one inequality. How can I plot this type of ...
0
votes
0answers
101 views

Backtrack function

I am using Mathematica 9. In the Help help file is the built-in function Backtrack. In order to use it the Help file says: To use Backtrack, you first need to load the Combinatorica Package using ...
2
votes
1answer
104 views

Open an html saved notebook

I have found an html page clearly created using the Save as HTML option of Mathematica. Is ...
1
vote
1answer
139 views

Function derivatives in arbitrary dimension

I have a higher dimensional function: $$f(x,t)=-\ln(t)-\ln(1-\left\|x\right\|^2-t^2)$$ where $x\in\mathbb{R}^n,~t\in\mathbb{R}$. I want to compute the derivatives with the commands ...
0
votes
1answer
193 views

speed up for computing MatrixExp

My code use two method to computing MatrixExp, I expected the second snippet code will faster than the first one, but in fact it a bit slower than that. How can I ...
2
votes
0answers
63 views

How to save all variables in the workspace into a file? [duplicate]

I did some time consuming computation and obtained a lot of arrays and variables; however after restart the Mathematica Kernel, all these computational results disappeared. How can I save all these ...
4
votes
1answer
754 views

Combining Two Manipulated Plots Dependent on Same Variables

I need to combine two plots on the same graph to highlight the intersection of the two while being able to manipulate various parameters that are common to both functions. I need to have the slider ...
2
votes
3answers
428 views

Solve the system of equalities and inequalities

I have a system of expressions, in which each expression is an equality or inequality expression of the following form: Var = Var1 + Var2 Var $\odot$ number Var $\odot$ Var1 $\odot$ = $\leq | \geq | ...
1
vote
1answer
235 views

Plotting equations of motion of a baseball

So I went through the physics of a baseball and I got the exact same equations as shown here on page 8. I input all of the same parameters into my code, and I don't get the same thing. Any idea ...
4
votes
2answers
177 views

GraphPlot with black edges no rendering function

Is there any way to make the edges of a GraphPlot black without tediously writing out a long "EdgeRenderingFunction"? I guess you could ask the same kind of question about vertex labeling. For ...
1
vote
3answers
134 views

Discrete inequality plotting

I have an equation like this: $${20 \choose k}\cdot \sum_{i=0}^k {k \choose i}\cdot i \leq 1+f$$. I want to plot this inequality as the dependency between k and ...
3
votes
2answers
173 views

How to apply GraphLayout to parts of a graph?

I'm trying to sketch polymers. Here is how I do it for the monomer: ...
1
vote
3answers
109 views

Applying Reduce[] to a table [duplicate]

I have a table for example: t = Table[k,{k,5}] which returns {1,2,3,4,5} and for every element in this table I want to check when it is $\leq 1 + a$. I ...
4
votes
1answer
136 views

Selecting expressions from a sequence that are not subexpressions of earlier elements

I have a While loop that generates and prints an expression on each iteration (there can be thousands of iterations). UPDATE: Some expressions are generated in ...
4
votes
2answers
172 views

How to highlight overlapping regions in RegionPlot according to the overlapping times?

I want to plot the overlapping regions of several inequalities. For example, ...
5
votes
2answers
2k views

Optimization of a portfolio of stocks

I would like to use Mathematica to perform an optimization of a portfolio composed by 10 stocks. I did the first part to compute yields and expected yields, but I don't know how to finish the ...
3
votes
1answer
539 views

Plotting two functions against each other

I have two functions which are functions of t. Let's just say x1[t] and x2[t]. I want to ...
2
votes
0answers
775 views

Solar system simulation (n-body physics) with OpenCL

I would like to simulate a n-body solar system in Mathematica. I have found the following example: ...
18
votes
9answers
1k views

How to replace an element in a list based on the value of the next element?

I use Mathematica a little bit. I try to understand it, but it is hard I have a list of 5 numbers selected randomly from 0 and -1. I have to replace a 0 with a 1 when the 0 is followed by -1. My ...
3
votes
3answers
263 views

Prime factor counting function

Is there any way I can speed up this prime factor counting function? (I am looking for all numbers in a range with 3 prime factors (counted with multiplicity).) ...
0
votes
1answer
186 views

Does Mathematica know if an integral is convergent or not?

Consider the following integrals that I asked Mathematica to do, ...
9
votes
3answers
688 views

Different results for integration using Mathematica and MATLAB

I have the following integration: $$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$ I get different ...
0
votes
2answers
143 views

How to calculate expected return, row by row in matrix? [closed]

Please help me, I'm writing my project and dont know how to solve this big matrix: I have to compute return row by row: 1st row: (18.32-17.14)/17.14 ; (19.17-18.32)/18.32 .... ...
4
votes
1answer
181 views

Efficient ways to rotate a ListPlot?

I have a numerical solution from a differential equation that is in the form of a list, in $(x,z)$-plane. I would like to rotate the 2D ListPlot around the $z$-axis ...
6
votes
3answers
278 views

Finding the square root of a squared number?

Taking the square root of the square of a number Variable set to a real value I'm wondering why these examples a = -4.3; Sqrt@a² Sqrt@(a^2) Sqrt[a^2] Sqrt[a²] ...
14
votes
4answers
244 views

Unexpected dots from Line

I have noticed cases where Line produces dots in a graphics object when I think it shouldn't. The first of these is: ...
0
votes
0answers
118 views

Reading Eigenvalue / Eigenfunction result from Reduce

I am trying to find the eigenvalue/eigenfunction solution to: $$\tag 1 y''+3y + \lambda y=0 ; y'(0)=0, y'(\pi)=0$$ I used DSolve and Reduce and they seem to converge, however (embarrassingly) I am ...
4
votes
2answers
79 views

Pattern-rewriting Pattern triggers error?

I am trying to rewrite patterns. For example, I'd like to rewrite the pattern jFoo_Integer which has FullForm ...
3
votes
1answer
94 views

Assign clipboard object in mathematica when print screen is pressed (windows)

Mathematica runs behind, while another window is selected. When I press print screen, I want mathematica too detect this and call a function with the picture as argument. ...
2
votes
2answers
257 views

Pulling out common terms when simplifying complicated equations

I have a complicated expression where common terms are apparent but Simplify[] and FullSimplify[] don't appear able, even with plenty of assumptions added, to reduce down to a simpler form with common ...
4
votes
1answer
216 views

Summation with jump indices like 1,4,6,9?

I is easy to enter $ \sum_{s=1}^{n}k(s) $ But how can I enter $ \sum_{s=1,3}k(s) $ ? When I try it, Mathematica says ...
6
votes
0answers
137 views

Manipulating the pitch of a sound

After reading Manipulating a continuous stream of sounds I have to ask about controlling the frequency of a Sin sound in a continuous manner, with a ...
4
votes
1answer
194 views

Ordinary differential equation invloving the function composition

I want to solve the following function: DSolve[(A1*Exp[B1*f[x]] + A2*Exp[B2*f[x]])*f'[x] == A1*Exp[B1*x] + A2*Exp[B2*x], f[x], x] And this is what I get as an ...
0
votes
0answers
124 views

Assigning the answer of Solve to a variable [duplicate]

If I enter Solve[(x-2)(x+2)==0,x] then the answer comes up as {{x -> 2}, {x -> -2}} I want to make two variables ...
4
votes
3answers
187 views

PlotStyle with Table

I want to create a plot style with a table and manipulate the variables in the plot style. ...
3
votes
1answer
170 views

Simplify doesn't simplify HypergeometricPFQ with exact arguments

Consider a series: $$\sum_{t=0}^\infty \frac{8^{-11-2t}(22+4t)!}{t!(11+t)!(11+2t)!(32+t)}$$ ...
4
votes
0answers
244 views

How to get vertices of a polytope given by equalities and inequalities?

I have a polytope given by some equalities and inequalities, how can I get all the vertices of the polytope? If there's a way to deal with the one given by inequalities only, how can I reduce the ...
3
votes
1answer
117 views

How to start Mathematica kernel without loading init.m?

Is it possible to start Mathematica kernel from UNIX command line without having the init.m loaded, but not by simply deleting or commenting out it before hand? If this is a Mathematica script, is it ...
0
votes
0answers
97 views

Problem with strings imported from PDFs

I am currently working with a list containing around 20 strings which contain around 30,000 characters each. The strings are imported from PDFs and the list containing all the strings is assigned to a ...

15 30 50 per page