Carl Love

Carl Love

28050 Reputation

25 Badges

12 years, 336 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@maple_user_2017 If you'd prefer not explaining a "workaround" to your students, I'll note again that solve followed by evalf gets you your results without issue. Your initial problem was that you were thrown off course by RootOf. Those can usually be resolved with evalf if there are no symbolic parameters.

@maple_user_2017 You're absolutely right that it's difficult to understand why this trick works. I only said that it was obvious to me (as 20-year hard-core Maple user), not that it was obvious in general.

Here is my insight---just some heuristics, not an algorithm. This is also just me guessing---I haven't investigated in this case. The command fsolve is unfortunately very sensitive to precision issues. It tries to guarantee that its results are accurate to the last decimal place. That's good, but what's unfortunate is that there's no way for the user to control how many extra digits it uses internally. The result is that fsolve often gives up and returns unevaluated even though it has actually found a result accurate to almost the last decimal place. The variable a is essentially part of an exponent. Tiny changes in an exponent can lead to much larger overall changes. With my substitution, the first two equations are simple polynomials (no variables in exponents) that can be solved independently of the third equation.

Note that your solve command also reduced the problem to a polynomial. If you had pressed forward by applying evalf to solve's result, you would've obtained the same result that we just got from fsolve. You can usually do this with RootOf results from solve.

Do you mean What aspects of a convergent transition matrix[*1l affect the rate of convergence of its powers?

[*1] transition matrix is a square matrix of probabilities each row of which sums to 1. It's convergent if its powers approach a limit.

@tomleslie The function is piecewise differentiable on the same intervals on which the derivative is piecewise continuous. That's enough. The derivative of the function is the stated derivative; so it is a solution.

In Maple 2018, and perhaps earlier, sum(binomial(k+j, k), j= 0..n-k) immediately evaluates to binomial(n+1, k+1), even without the assumptions.

@mschneider I just added my version of Christian's line of code to my Reply above. Maybe it's easier to understand. Breaking it down:

  • indets(A, 'ln'(dependent(x))) finds the set of all subexpressions of A that are ln functions with argument depending on x (that's your x).
  • op~ strips the ln off of all of them.
  • >~ 0 sets them all greater than 0.
  • The means "apply the operation to all the objects in the container rather than to the container itself". It's called the elementwise operator (see ?elementwise). It's similar to map.

@mschneider Your misunderstanding is because the x in Christian's procedure is that procedure's parameter; it's not the x that occurs in your equation. All his procedure does is ensure that the arguments to both logs are positive. In other words, a*x + b > 0 and c*x+d > 0.

I would write his line of code as follows, which is perhaps easier to understand:

B:= op~(indets(A, 'ln'(dependent(x)))) >~ 0;

@vv A great, efficient answer that wouldn't occur to most new users. Vote up. To make it a bit more robust, I think that you should enforce q > p because there's the potential that some procedures that call ifactors rely on the primes being in order, even if ModularSquareRoot does not.

Please expand your worksheet online, so that it appears in the Post.

How'd you call help: a question mark, F1, help command, hyperlink, or something else?

@lima_daniel My Answer needs to be clarified a bit: The imaginary numbers in your posted worksheet appear to me to be spurious imaginary parts from some calculation, but it's not the calculation directly shown in the worksheet. I concur with Tom and Acer that re-execution of your worksheet does not produce the same numbers. Perhaps Asch had inadvertently been assigned a numeric value?

These imaginary numbers do not appear to me to be the result of the licensing issue mentioned by Kitonum, but I'm not sure. That issue seems to produce numbers much smaller and with equal real and imaginary parts.

Is "question from maple" the best title that you could come up with? Didn't you expect that the vast majority of Questions here are questions from Maple? An appropriate specific title increases the relevance of your Question far into the future. How about "Finding the coefficients for a trig identity"?

@Christian Wolinski Using expand will show powers of cos(t) alone. That's not quite what was asked for.

@Carl Love As I requested before, please respond to my Answers. Does the above do what you want?

@Bob Sullentrup You wrote:

  • What do you mean, "only numerically"? Do you mean there is no algebraic solution...?

Yes: Except for a few simple cases, there is generally no algebraic solution for the inverse of a polynomial of degree 5 or higher. This is a very famous theorem: See Abel-Ruffini theorem.

  • ...but the only thing you can do is to  calculate values of the polynomial and then switch x and y?

It's not quite that crude. There are numerous numeric solution techniques (which given a numeric value of y find the approximate numeric value(s) of x) that are more sophisticated than that, such as Newton's method. These methods can usually find inverse values to an arbitrary number of decimal places nearly instantaneously. 

  • And what is the function 'fsolve'? Some computer language? Doesn't look like Excel. 

Lol. The name of this forum is MaplePrimes because it's primarily about the mathematical software named Maple, so most Answers will have some Maple code. The function fsolve is a command of the Maple language that applies the numeric techniques discussed in the last paragraph. There is similar functionality in Excel.

First 245 246 247 248 249 250 251 Last Page 247 of 709