| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 4 months |
| seen | 10 hours ago | |
| stats | profile views | 165 |
|
18h |
comment |
using array elements in minimization @remo you can update your question to show additional code. |
|
1d |
comment |
Constraining solution's sign with NSolve can you show more of your actual code? For me e.g. this is working: NSolve[(x + y)^2 + (x - y)^2 == 1 && (x + y)^4 + (x - y)^4 == 1 &&
x > 0 && y > 0, {x, y}] gives only the positive solution wheras NSolve[(x + y)^2 + (x - y)^2 == 1 && (x + y)^4 + (x - y)^4 == 1, {x, y}] gives all four solutions. |
|
2d |
comment |
How can i get the solution of complicated equation? Also it might be helpful to know the context in which the equation came up. What problem are you trying to solve? |
|
2d |
revised |
Counting multiplications (complexity function) added 304 characters in body |
|
2d |
revised |
Counting multiplications (complexity function) fixed bug (Cases didn't catch products at deeper levels before) |
|
2d |
answered | Counting multiplications (complexity function) |
|
May 22 |
answered | How do I get my equation to have the form $(x-a)^2 + (y-b)^2 + (z-c)^2-d = 0$? |
|
May 22 |
comment |
How do I get my equation to have the form $(x-a)^2 + (y-b)^2 + (z-c)^2-d = 0$? You could express the last line neatly with a fold: Fold[CompleteTheSquare, expr, {x, y, z}] |
|
May 8 |
comment |
Improving speed of Exp[] When dealing with probabilities, sometimes it can be more efficient to work with their natural logarithm instead of the probabilities themselves. |
|
May 1 |
comment |
Why does this simple program leak memory? Have you checked if the MathKernel itself leaks memory or the spawned PNG.exe processes? |
|
Apr 29 |
comment |
Problem with NIntegrate when WorkingPrecision is specified You can make it easier for others to check your code when you copy it straight from the Mathematica cell (copy as plain text) and paste it in your question with an indentation of 4 spaces. |
|
Apr 28 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? deleted 4 characters in body |
|
Apr 28 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? deleted 2 characters in body |
|
Apr 28 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? added 156 characters in body |
|
Apr 28 |
comment |
Any rule of thumb for converting a simple mathematical expression into a pure function? Thanks for pointing that out, i'll add that to the answer. |
|
Apr 27 |
comment |
Any rule of thumb for converting a simple mathematical expression into a pure function? Usually code gets easier to read and simpler when the data structure matches the structure of the objects you are dealing with. In this case the two vectors being represented by two lists. You surely could write code with the same functionality for a flattened out version of the data but it would probably be harder to read. But there's no right or wrong here. Often it's a tradeoff between readability and performance (e.g. vectorised operations are fast but can get hard to read if the vectors are flattened out versions of something different like trees for example). |
|
Apr 27 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? added 106 characters in body |
|
Apr 27 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? added 499 characters in body |
|
Apr 27 |
revised |
Any rule of thumb for converting a simple mathematical expression into a pure function? added 499 characters in body |
|
Apr 27 |
comment |
Any rule of thumb for converting a simple mathematical expression into a pure function? Yeah, i noticed that, too. I couldn't tell if the goal is to get a formula for euclidean distance or if the extra Abs is on purpose. |