Carl Love

Carl Love

28110 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

ISC:=proc(T::list, Eq::`=`)
local f:= unapply((lhs-rhs)(Eq), indets(Eq,name)[]);
     `or`(seq(f(i[]) >= 0, i= T)) and `or`(seq(f(i[]) <= 0, i= T))
end proc:

I am having trouble understanding your phrase "vector that spans it". One vector does not determine a line. Do you mean the ray starting at the origin in the direction of the vector?

@spradlig Suppose that N is a large integer, say with 1000 digits, that happens to be a perfect cube. Now suppose that the user enters a lengthy expression that contains N^(2/3). Should Maple take the significant time needed to reduce that? What if the user wanted to avoid using that time? Afterall, the user could have used surd to force the computation if that was what was wanted. What if the exponent would have cancelled or changed because of something else in the expression? Then the time would've been completely wasted. All automatic simplifications involve a trade-off like that.

Like I said, the issue with the plots is completely different. Changing that requires a fundamental change of the computation mode from complex to real. It is not an issue of automatic simplification.

Now, if you want Maple to be just a fancy graphing calculator for students in elementary classes, then the solution is simple: Make RealDomain the default in an initialization file. But Maple in general is not just for elementary classes.

How does Mathematica handle the case in the first paragraph?

 

@spradlig There are two distinct issues involved in the disposition of a^(p/q) for real a and integer p and q, depending on the sign of a.

The issue for positive a: That Maple does not automatically simplify (when simplification is possible) the expressions for positive a is just an issue of "laziness" rather than an issue of the value of the expression.

The issue for negative a: This is the issue with the plots. In this case the issue involves a change in the actual value of the expression. As stated at ?arithop :

For non-integer (complex) numeric powers y and (complex) numeric x, the expression x^y is evaluated as exp(y*ln(x)), where ln(x) is evaluated using the principal branch of the logarithm.
The function surd can be used to compute real odd roots of negative real numbers.

 

@digerdiga We can compare the residual sums of squares, and the nonlinear fit is better, but only slightly better.

 

restart; X := [51, 61, 71, 81, 101, 121, 141, 161, 201]; Y := [1.041, 1.034, 1.0296, 1.0259, 1.021, 1.017, 1.015, 1.013, 1.010]; Sol1 := Statistics:-Fit(1+a*n^b, X, Y, n, output = [leastsquaresfunction, residualsumofsquares])

[1+HFloat(2.104535315321519)/n^HFloat(1.0016417326693776), 0.4622540436e-6]

(1)

f1, rsos1 := Sol1[]:

[[a1 = .799926275564916, b = -1.01422767855349], Vector[row](2, {(1) = 0.567833223923361e-1, (2) = 0.122755809256029e-1})]

(2)

f2 := eval(1+exp(a1)*n^b, Sol2[1]);

1+HFloat(2.225376857792843)/n^HFloat(1.0142276785534934)

(3)

rsos2 := add((eval(f2, n = X[k])-Y[k])^2, k = 1 .. nops(X));

HFloat(5.959560138109656e-7)

(4)

plots:-display([plot([f1, f2], n = 50 .. 210), plots:-pointplot(zip(`[]`, X, Y))]);

 

``


Download Linearized_Fit.mw

@digerdiga We can compare the residual sums of squares, and the nonlinear fit is better, but only slightly better.

 

restart:

X:= [51, 61, 71, 81, 101, 121, 141, 161, 201]:

Y:= [1.041, 1.034, 1.0296, 1.0259, 1.021, 1.017, 1.015, 1.013, 1.010]:

Sol1:= Statistics:-Fit(
     1+a*n^b, X, Y, n,
     output= [leastsquaresfunction, residualsumofsquares]
);

[1+HFloat(2.1045354792676307)/n^HFloat(1.0016417508071458), 0.462254043633566e-6]

f1, rsos1:= Sol1[]:

X1:= ln~(X):  Y1:= ln~(Y -~ 1):
Sol2:= Statistics:-Fit(a1+b*n, X1, Y1, n, output= [parametervalues, standarderrors]);

Sol2 := [[a1 = .799926272563527, b = -1.01422767794265], Vector[row](2, {(1) = 0.567833227040259e-1, (2) = 0.122755809934050e-1})]

f2:= eval(1+exp(a1)*n^b, Sol2[1]);

1+HFloat(2.22537685111362)/n^HFloat(1.0142276779426467)

rsos2:= add((eval(f2, n= X[k])-Y[k])^2, k= 1..nops(X));

HFloat(5.959559940306572e-7)

plots:-display([
     plot([f1, f2], n= 50..210),
     plots:-pointplot(zip(`[]`, X, Y))
]);

 

Download Linearized_Fit.mw

I updated the procedure substantially to include the eigenvalues, and I added some color to improve the eye-tracking of the circles. I also added a second example, where the disks are more separated.

I updated the procedure substantially to include the eigenvalues, and I added some color to improve the eye-tracking of the circles. I also added a second example, where the disks are more separated.

@DJJerome1976 

I agree with DJ Jerome's skepticism about RealDomain. I am particularly skeptical about RealDomain:-solve. That's why I said to put

with(RealDomain, `^`);

rather than

with(RealDomain);

into your initialization file. The former will overload only the `^` operator, which is enough to accomplish everything discussed in this thread and which doesn't introduce any problems that I know of.

@DJJerome1976 

I agree with DJ Jerome's skepticism about RealDomain. I am particularly skeptical about RealDomain:-solve. That's why I said to put

with(RealDomain, `^`);

rather than

with(RealDomain);

into your initialization file. The former will overload only the `^` operator, which is enough to accomplish everything discussed in this thread and which doesn't introduce any problems that I know of.

@Alina8faq Yes, there is a way that you can use I as a variable in Maple 13. First, choose a symbol to use as the imaginary unit. Let's say that you choose J (although it need not be a single letter). Then give the command

interface(imaginaryunit= J);

Now you are free to use I however you like.

Even though you use the I with subscripts, it is still confusing to algsubs. But all will be okay if you give the command above.

@Alina8faq Yes, there is a way that you can use I as a variable in Maple 13. First, choose a symbol to use as the imaginary unit. Let's say that you choose J (although it need not be a single letter). Then give the command

interface(imaginaryunit= J);

Now you are free to use I however you like.

Even though you use the I with subscripts, it is still confusing to algsubs. But all will be okay if you give the command above.

@ANANDMUNAGALA Please note that I have significantly updated the procedure since you posted the above Reply.

@ANANDMUNAGALA Please note that I have significantly updated the procedure since you posted the above Reply.

@oxy Even using a variety of assumptions, I cannot simplify the expression or convert it to StandardFunctions.

First 600 601 602 603 604 605 606 Last Page 602 of 710