acer

33054 Reputation

29 Badges

20 years, 171 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

Interesting. When you strengthen any assumptions on beta, can you use subs() and replace any older expressions's "beta"s with the new? To make doing that easier, you could assign beta to some new temp name, on each call to additionally(). A very crude example,
> restart:
> assume(beta::real):
> z := beta:
> A := <beta*Pi>:
> additionally(beta>0);
> z2 := beta:
> newA := subs(z=z2,A);
                       newA := [beta~ Pi]
 
> map(about,indets(%[1]));
Originally beta, renamed beta~:
  is assumed to be: RealRange(Open(0),infinity)
 
                                      {}
So, above, the result newA of the subs() call is a new Vector, a copy of A but with the new tighter beta.
> A-<beta*Pi>;
                             [beta~ Pi - beta~ Pi]
 
> newA-<beta*Pi>;
                                      [0]

acer
> X:=Vector(100,(i)->i):
> X[61]:=X[60]:

> for i from 1 to 100 do
>   if X[i]=X[i+1] then
>     k := i;
>     break;
>   end if;
> end do:

> k;
                                      60

> i;
                                      60
acer
One way in which this sort of behaviour can arise is if expressions with beta are created each with different assumptions on beta. That is to say, distinct beta~ instances can be created. In such a case, such distinct instances may not cancel (and rightly so, if they have differing assumptions). For example,
> restart:
> assume(beta>0);
> a:=beta;
                                  a := beta~
 
> assume(beta>=0);
> c:=beta;
                                  c := beta~
 
> a-c;
                                 beta~ - beta~
 
> map(convert,a-c,`global`);
                                       0
acer
Could you post the values of A,B,C,D,E, and F? acer
Does this work for you? sol1:=fsolve(h(x)=h1(x),x,1..10); fsolve(h(x)=h1(x),x,avoid={x=sol1},1..10); acer
u:=[1,2,5]; op(u); max(op(u)); acer
Here's the default, usual situation in Maple,
> restart:

> about(x);
x:
  nothing known about this object

> is(sin(x),real);
                                     false
You can put assumptions on x, which is a sort of restriction of the domain when x is used as an argument of a function.
> assume(x::nonnegint);

> about(x);
Originally x, renamed x~:
  is assumed to be: AndProp(integer,RealRange(0,infinity))
 
> is(sin(x),real);
                                     true
acer
simplify( sqrt(4) ); assume(d>0); sqrt(d^2); acer
Have a look at ?LinearAlgebra,GenerateMatrix acer
To find the indeterminates, f := x^2*y + 10*z*w + 2*a*t; indets(f); nops(indets(f)); acer
This was in Maple 11.02, > e := (1+b)*x^2+a*(1+b)*x+b*(b-1)+2*b: > factor(expand(e)): > lprint(%); (1+b)*(b+x^2+a*x) Knowing the factor (b+1) in advance, this next was also possible for this example, > e := (1+b)*x^2+a*(1+b)*x+b*(b-1)+2*b: > (b+1)*simplify(e/(b+1)): > lprint(%); (1+b)*(b+x^2+a*x) acer
Plotting `xtba` vs `ytba` for a range of `T`, with fixed `press`.
ytba:=(press-exp(14.7569-2895.6078/(T+140.7459)))*exp(14.7569-2895.6078/(T+140.7459))/((exp(16.5270-3026.8900/(T+168.1400))-exp(14.7569-2895.6078/(T+140.7459)))*press);

xtba:=(press-exp(14.7569-2895.6078/(T+140.7459)))/(exp(16.5270-3026.8900/(T+168.1400))-exp(14.7569-2895.6078/(T+140.7459)));

plot(eval([xtba,ytba,T=30..50],press=100));
acer
Here's a couple of ideas. # replace with your procedure... `#mo("∇")`:=proc(V::Vector) map(sin,V); end proc: `#mo("∇")`:=`#mo("∇")`: Then after each time you grab the nabla from the Common Symbols palette (or cut and paste it) you would have to select the inserted symbol (only) with the mouse, and use the Context Menu action, 2D Math -> Convert To -> Atomic Identifer In this way, I was able to get it to look like a Del/nabla and act like a function on a Vector. I had to use round brackets though, like for any other procedure. Another way that worked for me was to issue, unprotect(VectorCalculus:-Nabla); After that, I could use the symbol from the palette without having to do Context Menu toggling each time. But even this way I couldn't get it to work without using brackets in order apply it, without receiving the error, Error, (in Typesetting:-delayGradient) unable to compute gradient until a co-ordinate system has been defined (see ?VectorCalculus:-SetCoordinates) I don't know if there's a clever workaround for that. acer
1) with(LinearAlgebra): A:=RandomMatrix(2): B:=RandomMatrix(2): X:=Vector(2,(i)->convert(cat("x",i),name)): Y:=LinearSolve(B,A.X); A.X-B.Y; 2) LinearAlgebra[GenerateMatrix]([x1-x3,x1+x2-x4, x1+x2, x3+x4],[x1,x2,x3,x4]); 3) evals:=Eigenvalues(evalf(A)); `+`( seq(`if`(Im(x)=0.0,signum(Re(x)),NULL),x in evals) ); acer
Here's my exam tip. When you do indefinite integrations, don't forget to add the constant (+ C). Those docked half-points add up. Do it like Maple does dsolve({diff(f(x),x)=x}) , not like it does f(x)=int(x,x) . acer
First 330 331 332 333 334 335 336 Last Page 332 of 343