Questions tagged [mathematica]

For questions concerning the popular computational software program published by Wolfram Research. (Note: you are more likely to get quicker and more accurate response if you ask the question on their user forum or on the Mathematica Stack Exchange site.)

For questions concerning the popular computational software program published by Wolfram Research. (Note: you are more likely to get quicker and more accurate response if you ask the question on their user forum or on the Mathematica Stack Exchange site.)

714 questions
2
votes
2 answers

applying plus to sublevels of sparsearray in Wolfram Mathematica converts it to a normal list. How to avoid it?

I have a sparse array of tuples of positive real numbers (in fact a probability distribution) say p=SparseArray[{{100,1}->0.25,{100,2}->0.25,{101,1}->0.3,{305,2}->0.2},{641601,2}] Now I would like to sum every list on the first level to get a…
2
votes
0 answers

simplification of multivariable equations

Can anybody suggest me any method to simplify this equation? This is the equation with conditions: $\sum\limits_{i=0}^{i=4}\lambda_{i}^{2} = 1$ and $0≤\lambda_{i} ≤ 1$ (as they are probability amplitudes). I have tried the simplification using…
2
votes
3 answers

A way to identify a unique number '$a_1$' has performed operations on '$x$'

The problem I have is bit vague, so I will try to explain as best as I can. Suppose we have a base number '$x$' and a set of unique number $'a_1', 'a_2', 'a_3', 'a_4'$ and so on Now $a_1$ perform some operation on $x$ and results in $y_1$ From…
2
votes
0 answers

Solving Quadratic Equation By Using Mathematica

I was bothered with the following very simple problem: Solving a quadratic equation $x^2+x+1=0$ in mathematica if I use "solve" function in mathematica as below: Solve[x^2 + x + 1 == 0, x] I will get very weird solutions $$x = -(-1)^{1/3}; \;\;\;…
Fianra
  • 1,248
2
votes
0 answers

Precision of starting values in FindMinimum

I am currently working on an optimization of chemical kinetic model. Starting points for FindMinimum is defined as: $k_{10} = 2.45\cdot 10^{-1}$ and $k_{20} = 8.65\cdot 10^{-11}$. The step monitor is used to show calculated values of $k_1$ and $k_2$…
1
vote
1 answer

In Mathematica is it possible to define the plot range by an inequality?

For example, like Plot[Sin[x], {x, Sin[x]<0.5}] The above line is not working. I want to know if this idea is possible in Mathematica. Thank you!
Anna Le
  • 89
1
vote
1 answer

See currently assigned variables in Mathematica

I've noticed that in a notebook, if I define a variable, and then delete the definition, the variable stays assigned. Is there a quick way to see all the variables that are assigned? I can find them by using the debugger, but it is kind of tedious…
harvey
  • 11
  • 1
1
vote
0 answers

Can nodes of Gaussian quadrature shift range?

I used my Python program to generate Gaussian's nodes and their weights. My python program could generate nodes as default in rage of (-1, 1). And my friend used Mathematica to generate them also but with using by Mathematica he could generate nodes…
fronthem
  • 303
1
vote
1 answer

Mathematica: Specifying assumptions/domains doesn't seem to work?

I frequently have trouble trying to place limits on Solve or Reduce using assumptions and domains. For example, this code: Assuming[x > 0 && x < 1, Solve[(1 - (1 - x)^3)^3 == x, x, Reals]] Produces results both with complex number, and with x…
OctaviaQ
  • 1,059
1
vote
2 answers

Newton's Method in Mathematica?

Which code should I use it for? FindRoot? or Plot? I am actually new to this program... and I would appreciate if you could tell how to mention the precision. Thanks! Solve the nonlinear equation $\sin(x+0.5)=0.2x-2$ by Newton's method (precision…
Samuel
  • 21
1
vote
3 answers

Simple problem with pattern matching in Mathematica

I'm having trouble setting a pattern for simplifying a complex expression. I've distilled the question down to the simplest case where Mathematica seems to fail. I set up a simple rule based on a pattern: simpRule = a b v___ - c d v___ -> e…
Keith
  • 243
1
vote
2 answers

How do I transform an array into the Traditional Form with mathematica?

I am trying to set an expression in Mathematica that uses an array. However it is problematic to typeset this expression and still be able to use it. Here is my example: data := {{8.2, 123.2}, {8.2, 123.2}, {8.22, 121.8}} addata := {0.03,…
tarrasch
  • 117
1
vote
1 answer

Difference between validity and satisfiability?

I am having problems understanding the difference between validity and satisfiability. Given the following: (i) For all F, F is satisfiable or ~F is satisfiable. (ii) For all F, F is valid or ~F is valid. How do I prove which is true and which is…
1
vote
2 answers

Finding sets of integer multiples of $1/\log{(n)}$, close to each other

I need to find integers $N_k$ such that, for example, $N_1 / \log{(2)} \approx N_2/ \log{(3)} \approx N_3/ \log{(5)} $ up to some specified precision. I posted this question on another forum and got a hint that the Lenstra-Lenstra-Lovasz (LLL)…
Praveen B.
  • 91
  • 8
1
vote
1 answer

Simplify and FullSimplify do not simplify a simple term

Why don't Simplify and FullSimplify work on: $\frac{\sqrt{a + \cos \theta}}{\sqrt{\frac{a + \cos \theta}{1 + a}}}$? FullSimplify[ Sqrt[a + Cos[\[Theta]]] /Sqrt[(a + Cos[\[Theta]])/( 1 + a)]] Even if $\cos \theta \leq 0$ the term should…