17,915 reputation
12160
bio website
location
age
visits member for 2 years, 3 months
seen 11 hours ago

Aug
22
comment Modelling a Rocket Launch using NDSolve
If you supply the conditional statements you want added, someone will show you how.
Aug
22
revised Given a symbolic expression how to find if starts with a minus or not?
added more tests
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
Sure. I know you knew that and were just checking on requirements. Will add it to the question to be more clear. thanks.
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
Yes, the last case, h^-2 should NOT be negative. THere is only ONE term, all symbolic, but can start with a minus sign or not. Hence $h^{-2}$ should not be valid for saying it starts with minus sign. For example, MemberQ[#, _?Negative] & /@ {1/h} return TRUE, which is not right.
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
I tried you solution like this: Negative[Extract[dummy*negativeFalseTests, 1]] and I get this: !Mathematica graphics
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
Only ONE term, and hence, the term, if it has a minus sign, it will have to be the first thing (looking at it, not in tree form). So, only ONE term. Hence -h-f will not show up. Only (- h) * derivative(something) or h*derivative or number*h*derivative etc....
Aug
22
revised Given a symbolic expression how to find if starts with a minus or not?
clarified
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
I think it is ok. Adding terms is not fair. Since Mathematica will rearrange terms on its own. So x-h might end up as -h+x. So let just leave it at one term for now. I did not mean for this to become too hard.
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
Nope. Expression returned does not have a dummy. Have to use the expressions as shown. Can't modify them. These are returned from a function.
Aug
22
revised Given a symbolic expression how to find if starts with a minus or not?
added mroe tests
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
You have a bug: expr = h^2*Derivative[4][f]- 2 h then (expr /. Thread[Variables[expr] -> 1]) < 0 it gives true. But it should be False ! I knew this was not as easy as it looked :) will add this to the tests
Aug
22
revised Given a symbolic expression how to find if starts with a minus or not?
added test
Aug
22
comment Given a symbolic expression how to find if starts with a minus or not?
THat does not work? Negative[Extract[ h^2*Derivative[4][f], 1]] gives Negative[h^2] It has to work even if there is no number at the start of the expression. I'll add that as an example also.
Aug
22
asked Given a symbolic expression how to find if starts with a minus or not?
Aug
22
revised Interpolation Problem
correct method
Aug
22
revised Interpolation Problem
corrected code
Aug
22
revised Interpolation Problem
added comparing 3 methods
Aug
21
comment CUDA* commands are very slow on OS X and Mac
Please mention that this question has been posted at community.wolfram.com/groups/-/m/t/101464?p_p_auth=aZ4uSZGg with number of answers there already so that folks do not waste time duplicating effort.
Aug
21
comment Reuse a dynamic list
You say: this simple code here. No. This code is not simple. If it was simple, you would have seen the problem allready ;). In cases like these, I take break the code apart, try each piece on its own to make sure it works ok, then build things back piece by piece. And try to spread things out a little. This always works.
Aug
21
reviewed Approve suggested edit on Using Log when working with a time-series