Robert Israel

6577 Reputation

21 Badges

18 years, 208 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

Nevertheless, there are a few instances where $ is rather handy and safe. For example, diff(f(x), x$n) for an n'th derivative, or $1..n for the integers 1 to n.
Note that the problem wouldn't occur if you used seq instead:
> restart:
> with(LinearAlgebra):
> M1,M2 := seq(Vector(2,fill=Matrix(4,4)),i=1..2):
> M1[1] := M1[1] + IdentityMatrix(4):
> M2[1] := M2[1] + IdentityMatrix(4):
> M1[1];
In solving a system such as this, you want to be careful about what is considered to be a variable and what is a parameter. Maple will give you solutions expressing a set of basic variables in terms of the other variables and the parameters; these will be valid for "generic" values of the parameters, but perhaps not for special values of the parameters. Thus:
> sys := {x + y = a,
     x - y = b,
    2*x + 2*y = c}:
> solve(sys, {x,y});
This is treating x and y as the variables and a,b,c as parameters. It returns nothing since for generic values of parameters a, b and c, there are no solutions. But
> solve(sys, {x,y,c});
Now x,y and c are considered as variables, so you pick up the solutions that depend on c having a specific relation to a and b: {c = 2*a, y = 1/2*a-1/2*b, x = 1/2*a+1/2*b} You might also try Groebner[Solve]:
> Groebner[Solve](map(rhs-lhs,sys),[x,y,a,b,c]);
Note that in the second argument, I list the variables first and then the parameters. {[[2*a-c, 4*y-c+2*b, -c-2*b+4*x], plex(x,y,a,b,c), {}]} The first item in the returned list indicates that in order to have a solution, you need 2*a-c=0. Here's a system where the parameters enter the coefficients of x and y as well as the right sides:
> sys2:= { a*x + y = b, b*x + y = c, x - y = a }:
> G:= Groebner[Solve](map(rhs-lhs,sys2),[x,y,a,b,c]);
G:={[[-b*a+c+a^2-b+a*c-b^2, b*a+b*y-c+y, y+y*a+b*a-c-a*c+b^2, -a+x-y], plex(x,y,a,b,c), {}]} Again, the first item in the list shows a condition on a,b,c that is needed in order to have a solution.
The possible values of sin(x)/x - 1 for x real are all negative, so it's not at all surprising to me that fsolve fails to find a solution for sin(x)/x - 1 = y when y > 0. It's somewhat curious that it also fails for y = 0, but certainly not a bug: after all, sin(0)/0 is undefined. That solve finds 0 as a solution for sin(x)/x - 1 = y when y is nonzero, on the other hand, is a bug. Of course what it's doing is multiplying the equation by x and solving sin(x) - x = x*y, then neglecting to notice that this isn't equivalent to the original equation when x=0.
Hmm, I coulda sworn I didn't get any roots for this using RealDomain. I guess maybe I was using an earlier version at the time. Maple 10 returns no roots here. So there has been some improvement, but some more is still needed...
Hmm, I coulda sworn I didn't get any roots for this using RealDomain. I guess maybe I was using an earlier version at the time. Maple 10 returns no roots here. So there has been some improvement, but some more is still needed...
Surely you don't literally mean the union of two sets, rather the union of two RealRanges. Thus:
> {x < 2., 1. < x} union {x < 3., 2. <= x};
{x < 2., 1. < x, x < 3., 2. <= x} would not be good. One also might ask why unions and intersections of RealRanges are not simplified. For example:
> RealRange(0,1) union RealRange(1,2);
`union`(RealRange(0,1),RealRange(1,2)) Neither simplify nor combine have any effect. Actually, what does work is
> OrProp(RealRange(0,1), RealRange(1,2));
RealRange(0, 2)
First of all, if you want to upload a file it's better to send a Maple worksheet with Maple expressions that we can use directly, rather than a picture of a mathematical formula that we have to translate into Maple ourselves. Second, your R[i] won't just have "fractions": as far as I can tell they will be complicated expressions involving the Ei function and exponentials. It is quite unlikely that such things will have closed-form solutions; neither solve nor Groebner bases would be likely to help. fsolve might work, but might need help (e.g. specifying intervals in which the variables should lie). Third, I don't understand how you get N equations. Saying Ri = Rj for i,j = 1..N should give you only N-1 independent equations.
First of all, if you want to upload a file it's better to send a Maple worksheet with Maple expressions that we can use directly, rather than a picture of a mathematical formula that we have to translate into Maple ourselves. Second, your R[i] won't just have "fractions": as far as I can tell they will be complicated expressions involving the Ei function and exponentials. It is quite unlikely that such things will have closed-form solutions; neither solve nor Groebner bases would be likely to help. fsolve might work, but might need help (e.g. specifying intervals in which the variables should lie). Third, I don't understand how you get N equations. Saying Ri = Rj for i,j = 1..N should give you only N-1 independent equations.
That's not just for .mpl files. The currentdir command shows and sets the default directory for (I think) all file input and output done by Maple commands (as opposed to menu-driven operations).
That's not just for .mpl files. The currentdir command shows and sets the default directory for (I think) all file input and output done by Maple commands (as opposed to menu-driven operations).
Correct. The normal to the plane can be any nonzero vector perpendicular to the given vector. So choose such a vector as your normal, and then see what plane with that normal passes through the given point. Note that the answer to this question is not unique, because there are infinitely many possible choices for the normal.
Correct. The normal to the plane can be any nonzero vector perpendicular to the given vector. So choose such a vector as your normal, and then see what plane with that normal passes through the given point. Note that the answer to this question is not unique, because there are infinitely many possible choices for the normal.
Yes, there is an easy way:
> vargamma := convert(gamma, `local`);
Yes, there is an easy way:
> vargamma := convert(gamma, `local`);
First 173 174 175 176 177 178 179 Last Page 175 of 187