Carl Love

Carl Love

28155 Reputation

25 Badges

13 years, 354 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@vv It is commonplace for numeric procedures to increase the value Digits to whatever is needed to achieve the accuracy specified by the value of Digits in use when the procedure is called. If you need to set

Digits:= ceil(1.6*Digits);

in your procedure, then that's what you should do. Digits is an environment variable, so changes that you make to it are automatically reverted when the procedure is exited. To see examples of how Digits is manipulated, look at the code for any procedure named `evalf/F` where F is any standard mathematical function name.

The solution to your pair of equations eq[1] and eq[2] is indeed (0,0). I haven't checked your calculations before that. You should be using Maple's higher-level commands such as dsolve (for ODEs, BVPs, IVPs, some DAEs) and fsolve (for systems of floating-point algebraic equations).

I don't understand how---if at all---what you're asking for is any different from simply running separate Fit commands to fit x(t) and y(t).

@Markiyan Hirnyk The issue with integration can't be blamed on vv's procedure. It's just the failure of the numeric integrator to increase Digits to the extent needed the achieve the requested accuracy, which occurs in a great many numeric integrations with complicated integrands. Just change the int command to (for example)

int(Cf^2, 0..1, numeric, epsilon= 1e-4);

     0.2999991429

@tomleslie The OP is not redefining the Catalan numbers; the expression that he/she gave is one of many ways that Catalan numbers can be computed. It's mentioned in the Wikipedia article that you cite; it's the third displayed formula on the page.

Your definition of the function

a deinition of binom so that m so that binom(n,k) returns  n k  for all n greater than 0, and k greater than or equal to 0 using the definition of the binomial above

is nonsense because n > 0 and k >= 0 are not mutally exclusive conditions.

Which of the two results do you consider to be simplified "correctly"?

If you're working with complex expressions, and you want to assume that all variables are real, you should use evalc.

To get more help, you'll need to post the full code.

@H-R Let a be a negative real and r a rational number. In order for the function a^r to be continuous as a complex-valued function of r, it can't be allowed to switch from negative to imaginary every time the denominator of r switches from odd to even. Instead, the relation x^y = exp(y*ln(x)) (which holds for any complex x and y other than x=0) is used to determine the value, using the principal value of the logarithm.

(-1)^(1/3) = exp(ln(-1)/3) = exp(I*Pi/3) = cos(Pi/3) + I*sin(Pi/3) = 1/2 + I*sqrt(3)/2 = (1+I*sqrt(3))/2.

If you expand the cube of this complex number, using purely the means of high-school algebra, you'll see that you get -1:

((1+I*sqrt(3))/2)^3 = (1+3*I*sqrt(3)+3*I^2*3+I^3*3*sqrt(3))/8

= (1+3*sqrt(3)*I-9+3*sqrt(3)*I)/8 = (1-9)/8 = -1.

Maple is designed to work with complex numbers by default. So it's important that the primary operations like exponentiation work correctly for complex numbers. So, the less-important real-number case is handled by a secondary function, surd.

@vv This can be made more automatic by using IntegrationTools:-Change:

G:= (k::integer, n::integer)->
     (value@expand)(
          IntegrationTools:-Change(
               Int((1-cos(k*x)*cos(n*y))/(sin(x/2)^2+sin(y/2)^2)/2/Pi^2, [x,y]=~ 0..Pi),
               {x,y}=~ 2*~arctan~({u,v})
          )
     )
:

@Rouben Rostamian  You wrote:

In fact, I would appreciate it if someone points me to a reference.

See https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse

In particular, see the small section on projectors.

@Preben Alsholm The builtin frem performs a similar function. It's more analogous to mods than to modp.

So what happens when you click "+ Manage Tags"?

@marians I just restored your original Question as best that I could. You should review it to make sure that you approve. You can edit by pulling down the "More" menu, which is the last thing on the right at the bottom of any post. I am sorry that I was harsh with you about removing the Question. Apparently it was an accident, and you had nothing to do with it. There've been problems in the past with people intentionally removing their Questions after they've been Answered.

@marians It appears that you edited the original Question and removed it. Please put it back! It's unacceptable to remove a Question after it's been Answered.

Regarding your latest question, I guess that you want to compute the conjugate using each pair of elements of A and make a new set with the conjugates? Is that correct? And you want to include the cases where i = j (which, of course, just reduces to the set A itself), right?

@acer Ah, I see that it doesn't work for ISOSURFACEs. Thanks for bringing this to my attention.

To correct this, I could search through the 4-d Array for the points where the fourth coordinate is "close to" 0. Then, among those points, search for the extremal values of the third coordinate, which is the z-coordinate. Would that work? The question remains How "close to" 0? What criterion is used by the plot renderer to decide whether to plot a point of an ISOSURFACE? 

First 446 447 448 449 450 451 452 Last Page 448 of 711