wolfram-mathematica

What is the Computational Complexity of Mathematica's CylindricalDecomposition

寵の児 提交于 2020-01-02 03:32:07
问题 Mathematica' CylindricalDecomposition implements an algorithm known as Cylindrical Algebraic Decomposition. Wolfram MathWorld's article on Cylindrical Algebraic Decomposition says that this algorithm "becomes computationally infeasible for complicated inequalities." Can this statement be made more precise? Specifically, how does the time and space relate to the degree and number of variables of the multivariate polynomials? Does the time and space depend on other parameters? 回答1: Tarski

Function minimization with equality constraints in Mathematica 8

只愿长相守 提交于 2020-01-02 02:55:27
问题 When using constraints with simple equality in Mathematica 8, minimization doesn't work. E.g. FindMinimum[{x^2 + y^2, y == 1}, {x, y}] works ok in Mathematica 6, but gives errors in version 8. Can anyone else confirm (or explain) this? Looks like fixing one of the parameters with a constraint confuses version 8. Putting xy==1 is OK, also any inequality. Any simple workaround on this? I have tried changing the Method , no luck. I would like to keep all the parameters in the parameter list, but

Mathematica — why does TreeForm[Unevaluated[4^5]] evaluate the 4^5?

谁说我不能喝 提交于 2020-01-02 01:47:08
问题 If I give Mathematica the input TreeForm[Unevaluated[4^5]] I expect to see three boxes -- power, 4, and 5. Instead I see a single box with 1024. Can anyone explain? 回答1: Compare TreeForm@Unevaluated[4^5] with TreeForm@Hold[4^5] From the help: Unevaluated[expr] represents the unevaluated form of expr when it appears as the argument to a function. and Hold[expr] maintains expr in an unevaluated form. so, as Unevaluated[4^5] gets to TreeForm ... it gets evaluated ... It works like this: f[x_+y_]

Mathematica — why does TreeForm[Unevaluated[4^5]] evaluate the 4^5?

会有一股神秘感。 提交于 2020-01-02 01:47:08
问题 If I give Mathematica the input TreeForm[Unevaluated[4^5]] I expect to see three boxes -- power, 4, and 5. Instead I see a single box with 1024. Can anyone explain? 回答1: Compare TreeForm@Unevaluated[4^5] with TreeForm@Hold[4^5] From the help: Unevaluated[expr] represents the unevaluated form of expr when it appears as the argument to a function. and Hold[expr] maintains expr in an unevaluated form. so, as Unevaluated[4^5] gets to TreeForm ... it gets evaluated ... It works like this: f[x_+y_]

Using All in MapAt in Mathematica

左心房为你撑大大i 提交于 2020-01-02 01:16:14
问题 I often have a list of pairs, as data = {{0,0.0},{1,12.4},{2,14.6},{3,25.1}} and I want to do something, for instance Rescale , to all of the second elements without touching the first elements. The neatest way I know is: Transpose[MapAt[Rescale, Transpose[data], 2]] There must be a way to do this without so much Transpose ing. My wish is for something like this to work: MapAt[Rescale, data, {All, 2}] But my understanding is that MapAt takes Position -style specifications instead of Part

Animate the movement of a point along the plot of a specific solution obtained using ParametricPlot3D

浪子不回头ぞ 提交于 2020-01-01 11:57:10
问题 We have the system: x'[t] == x[t] - 5 y[t] + z[t] y'[t] == 3 x[t] - 3 y[t] - 3 z[t] z'[t] == -2 x[t] + 10 y[t] + 4 z[t] and the initial conditions: x[0] == .01 y[0] == 3 z[0] == 0 I produced the specific plot: eqn = {x'[t] == x[t] - 5 y[t] + z[t], y'[t] == 3 x[t] - 3 y[t] - 3 z[t], z'[t] == -2 x[t] + 10 y[t] + 4 z[t]}; sol = NDSolve[{eqn, x[0] == .01, y[0] == 3, z[0] == 0}, {x[t], y[t], z[t]}, {t, -5, 5}] {xde[t_], yde[t_], zde[t_]} = {x[t], y[t], z[t]} /. Flatten[sol] ParametricPlot3D[{xde[t

What's the best way to select the maximum one from a list of lists by their last element?

无人久伴 提交于 2020-01-01 09:17:20
问题 In Mathematica, Max[] is the most efficient function to get the maximum number in a list of numbers, but how do I find the list with the maximum last element in a list of lists? e.g. the 2-d coordinate with the biggest x part in a series of coordinates. My best try is SortBy , but obviously I don't need the program to sort my list, only the maximum one I need. 回答1: Perhaps: list = {{4, 3}, {5, 10}, {-2, 1}, {3, 7}} Reverse /@ Take[#, Ordering[#, -1]] &@(Reverse /@ #) &@ list (* -> {{5, 10}} *

What's the best way to select the maximum one from a list of lists by their last element?

三世轮回 提交于 2020-01-01 09:17:20
问题 In Mathematica, Max[] is the most efficient function to get the maximum number in a list of numbers, but how do I find the list with the maximum last element in a list of lists? e.g. the 2-d coordinate with the biggest x part in a series of coordinates. My best try is SortBy , but obviously I don't need the program to sort my list, only the maximum one I need. 回答1: Perhaps: list = {{4, 3}, {5, 10}, {-2, 1}, {3, 7}} Reverse /@ Take[#, Ordering[#, -1]] &@(Reverse /@ #) &@ list (* -> {{5, 10}} *

smallest integer not obtainable from {2,3,4,5,6,7,8} (Mathematica)

守給你的承諾、 提交于 2020-01-01 09:02:25
问题 I'm trying to solve the following problem using Mathematica: What is the smallest positive integer not obtainable from the set {2,3,4,5,6,7,8} via arithmetic operations {+,-,*,/} , exponentiation, and parentheses. Each number in the set must be used exactly once. Unary operations are NOT allowed (1 cannot be converted to -1 with without using a 0, for example). For example, the number 1073741824000000000000000 is obtainable via (((3+2)*(5+4))/6)^(8+7) . I am a beginner with Mathematica. I

smallest integer not obtainable from {2,3,4,5,6,7,8} (Mathematica)

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 09:02:09
问题 I'm trying to solve the following problem using Mathematica: What is the smallest positive integer not obtainable from the set {2,3,4,5,6,7,8} via arithmetic operations {+,-,*,/} , exponentiation, and parentheses. Each number in the set must be used exactly once. Unary operations are NOT allowed (1 cannot be converted to -1 with without using a 0, for example). For example, the number 1073741824000000000000000 is obtainable via (((3+2)*(5+4))/6)^(8+7) . I am a beginner with Mathematica. I