David Z
Reputation
1,996
Top tag
Next privilege 2,000 Rep.
 Mar 23 comment How to define a set of two random orthogonal unit vectors? This question addresses methods of choosing vectors on a sphere with a uniform distribution. Jan 17 awarded Yearling Jan 7 comment What should I learn from DSolve working better with a named constant than a number in this case? Oh, sorry if I was misleading: what I figured out is the apparent discrepancy between the partially-numeric solution you put in your answer and the symbolic one in my question. But that leaves me no closer to finding an answer to the original posted question. Jan 7 comment What should I learn from DSolve working better with a named constant than a number in this case? Actually, I figured it out: this is the same solution identified in my question, just with a different definition of $c_1$. It differs by a factor of $10^{20}$, as you can show with something like FullSimplify[r[phi]/.mysoln/.b->1+10^-10/.C[1]->10^20C[1] == r[phi]/.yoursoln]. Apparently, when we give b a symbolic value of a certain form, Mathematica absorbs a constant factor into $c_1$ to simplify the result a bit. This particular simplification procedure fails at $b=1$, but the solution itself should be fine. Jan 5 comment Using physical dimensions in Mathematica DSolve @MichaelSeifert Thanks, that's useful. Though the manipulation that solves that particular case ($\log A - \log B \to \log\frac{A}{B}$) is standard practice in physics. What motivated my comment was the situation in this question of mine, which doesn't seem to be so easily dealt with. There are no logarithms involved there (unless they're "hidden" somehow). Jan 5 comment What should I learn from DSolve working better with a named constant than a number in this case? Weird, but interesting. It kind of looks like the symbolic solution I included in the post, but with $b^2$ replaced by $\frac{1}{(b - 1)^2}$. I guess in that case $b = 1$ clearly would be special. Perhaps this is a separate solution? Jan 4 comment What should I learn from DSolve working better with a named constant than a number in this case? @george2079 I've had the same difficulty, though I'm still working on it. For what it's worth, I've checked that plugging the general solution back into the original equation simplifies to True, which I think should be fairly reliable. Jan 4 comment What should I learn from DSolve working better with a named constant than a number in this case? @Searke well, $b$ always occurs in combination with the arbitrary constant $c_1$. Certainly the case where $b^2 c_1 = 1$ is special, but I don't think that implies anything about merely having $b = 1$. Jan 4 asked What should I learn from DSolve working better with a named constant than a number in this case? Jan 4 comment Using physical dimensions in Mathematica DSolve This is useful to know but it still seems very weird that Mathematica would produce a dimensionally inconsistent solution to a dimensionally consistent equation. I'd be interested to know more about this but I can't think of a good way to formulate a question. Oct 29 comment Write a function that returns the coefficient of x^n @JasonB I suppose one could propose it as a Mathematica-specific popularity contest on Programming Puzzles & Code Golf Oct 20 comment Trying to find the asymptote to a function Incidentally, if you're sufficiently convinced the solution has an asymptote (and it's linear), you can take the large-$t$ limit and plug in $x=at+b$ to get $a=\sin[(1+a)t + b]$. The only way to satisfy this with $a$ and $b$ constant (remember, you're assuming the asymptotic behavior is linear) is if $a = -1$, which gives you $b = 3\pi/2 + 2n\pi$, and you can identify $n=0$ from the initial condition. But this is not a Mathematica solution, and not something that readily generalizes to other equations, which is why I only give it as a comment. Jul 23 awarded Stellar Question May 15 awarded Nice Answer Apr 19 comment Finding the period of an array of integers @QuestionC actually I don't think that algorithm works here, because in this question the cycle does not have to be complete at the end of the list. For example {1,2,3,1,2,3,1,2} should display a cycle length of 3, but the concatenate-and-search algorithm would indicate that the string is not periodic. Mar 10 awarded Notable Question Jan 17 awarded Yearling Jan 13 comment Color a Function by its Derivative Yes, though if I understand correctly, the approach in this answer needs to be manually modified to match the plot range in each case. Setting ColorFunctionScaling does the same thing but with the same syntax in every case. Jan 13 comment Color a Function by its Derivative Couldn't you use ColorFunctionScaling -> False to get around this? Nov 30 accepted Why is FindInstance finding non-instances?