<

## 6467 Reputation

15 years, 278 days
University of British Columbia
Associate Professor Emeritus

## @elango8 : Leave out the line assigning ...

@elango8 : Leave out the line assigning a value to t at the start of your E.mw.  You will get everything as expressions involving t.  Then you can evaluate these at particular values of t, you can do so using eval or seq.  For example, if you want K1 at t=0.8, t=0.9 and t=1.0, you could do this:

> K1vals:= [seq](K1, t= [ 0.8, 0.9, 1.0 ]);

## 2-D etc...

The easiest way to communicate on this site is with commands written in 1-D Maple input.  This allows easy copy-and-paste of the commands, whether into 1-D or 2-D Maple input.  We might show you a picture that looks like 2-D Maple input, but you couldn't paste it into Maple because it's only a picture - you'd have to type it in yourself.  As for the palettes etc, while it's easy to use them it's not always easy to communicate to someone else exactly what you did to achieve the result.  In addition, many of us prefer to use 1-D Maple input: while 2-D looks nice, it can be very easy to make mistakes and hard to catch them.

Your last line shows a bug in Maple: for some reason the assumption on the subscripted variables x1 and x2 isn't processed properly.

` > int(1/x, x = x[1] .. x[2]) assuming positive;`

Warning, unable to determine if 0 is between x~[1] and x~[2]; try to use assumptions or use the AllSolutions option
Warning, unable to determine if 0 is between x~[1] and x~[2]; try to use assumptions or use the AllSolutions option

` `

.It would have worked if you used, say, a and b as the endpoints.

> int(1/x, x = a .. b) assuming positive;

I will submit an SCR.

## 2-D etc...

The easiest way to communicate on this site is with commands written in 1-D Maple input.  This allows easy copy-and-paste of the commands, whether into 1-D or 2-D Maple input.  We might show you a picture that looks like 2-D Maple input, but you couldn't paste it into Maple because it's only a picture - you'd have to type it in yourself.  As for the palettes etc, while it's easy to use them it's not always easy to communicate to someone else exactly what you did to achieve the result.  In addition, many of us prefer to use 1-D Maple input: while 2-D looks nice, it can be very easy to make mistakes and hard to catch them.

Your last line shows a bug in Maple: for some reason the assumption on the subscripted variables x1 and x2 isn't processed properly.

` > int(1/x, x = x[1] .. x[2]) assuming positive;`

Warning, unable to determine if 0 is between x~[1] and x~[2]; try to use assumptions or use the AllSolutions option
Warning, unable to determine if 0 is between x~[1] and x~[2]; try to use assumptions or use the AllSolutions option

` `

.It would have worked if you used, say, a and b as the endpoints.

> int(1/x, x = a .. b) assuming positive;

I will submit an SCR.

## Imaginary parts...

Notice that when 0 < cp < 6450. sqrt(cp^2/6450^2 - 1) is the square root of a negative number, and thus is imaginary.  The implicitplot procedure only works with real-valued expressions.   The transformed expression is real-valued, and is 0 when the original expression is 0.

I don't know whether complex values make sense in your application.

## Imaginary parts...

Notice that when 0 < cp < 6450. sqrt(cp^2/6450^2 - 1) is the square root of a negative number, and thus is imaginary.  The implicitplot procedure only works with real-valued expressions.   The transformed expression is real-valued, and is 0 when the original expression is 0.

I don't know whether complex values make sense in your application.

## Enlarge the system...

@goli :Since you're already solving an ODE system, I think the simplest solution might be
to add a new dependent variable to the system: the derivative of this variable is the integrand.

> newde:= diff(r(z),z) = h*sqrt(1-om)/H(z);
newic:= r(0) = 0;
sol:= dsolve(sys union ics union {newde, newic}, stiff=true);
sol(1091.3);

So your desired R is 1.72589404761241.

## Enlarge the system...

@goli :Since you're already solving an ODE system, I think the simplest solution might be
to add a new dependent variable to the system: the derivative of this variable is the integrand.

> newde:= diff(r(z),z) = h*sqrt(1-om)/H(z);
newic:= r(0) = 0;
sol:= dsolve(sys union ics union {newde, newic}, stiff=true);
sol(1091.3);

So your desired R is 1.72589404761241.

## DrawGraph...

Hmmm: the question seems to be which "a" is the actual root, the original a or the one that was originally c1.  You expected the original a, the program chose the one that was originally c1.

For greater certainty, you could do the substitution after the DrawGraph command (since a,b1, etc. will be present in the plot structure produced by DrawGraph).  Thus:

> subs(b1 = b, b2 = b, c1 = a, c2 = c, c3 = b, DrawGraph(G, style=tree, root=a));

## DrawGraph...

Hmmm: the question seems to be which "a" is the actual root, the original a or the one that was originally c1.  You expected the original a, the program chose the one that was originally c1.

For greater certainty, you could do the substitution after the DrawGraph command (since a,b1, etc. will be present in the plot structure produced by DrawGraph).  Thus:

> subs(b1 = b, b2 = b, c1 = a, c2 = c, c3 = b, DrawGraph(G, style=tree, root=a));

Not being a number theorist, I haven't made much use of p-adics.  However, the p-adic order of a rational number is something that is often quite handy, and padic[ordp] will compute it.  Thus if p is a prime and  r is a nonzero rational number, padic[ordp](r, p) will compute the integer n such that r = pna/b where a and b are integers coprime to p.

Another command in the padic package is rootp, which finds p-adic roots of a polynomial in one variable.  How might this be helpful to a non-specialist?  Well, it can be thought of as encoding information about the solutions of this polynomial modulo different powers of p.  For example:

So x=9 is a solution of x3+x+3 = 0 mod 13, and x=9 + 6 . 13 = 87 is a solution of this equation mod 132, etc.: since (if rootp can be believed) there is a 13-adic root of the polynomial. the truncations of that root give solutions mod 13n for each positive integer n.  There happens to be another solution of x3+x+3 = 0 mod 13, namely x = 2, but that one doesn't "lift" to the next power of 13.

## Copy and paste...

I just made a 2 x 2 Matrix in Maple 15 (Standard GUI, under Windows 7).  I highlighted the output with the mouse, hit Ctrl-C, and then here (in Firefox 7.0.1) I hit Ctrl-V, and behold:

I've had trouble before, but right now direct copying of 2D output from Maple seems to be working fine.  However, for code it's best to copy text (from 1D input) rather than images, as the images can't be imported directly into Maple.

## Nested seq...

@elango8 : Then you can use something like

As:= map2(`=`,a, [a1,a2,a3]);
...
Is:= map2(`=`,i,[i1,i2,i3]);

cases:= [seq(seq([As[ii],Bs[ii],Cs[ii],Ds[ii],Es[ii],Fs[ii],Gs[ii],Hs[ii],Is[jj]], jj=1..3),ii=1..3)];

## Nested seq...

@elango8 : Then you can use something like

As:= map2(`=`,a, [a1,a2,a3]);
...
Is:= map2(`=`,i,[i1,i2,i3]);

cases:= [seq(seq([As[ii],Bs[ii],Cs[ii],Ds[ii],Es[ii],Fs[ii],Gs[ii],Hs[ii],Is[jj]], jj=1..3),ii=1..3)];

## Oops...

@Preben Alsholm :  Oops, yes.  That "output=list" was from an earlier version that somehow didn't get deleted.  Thanks for catching this.

 5 6 7 8 9 10 11 Last Page 7 of 187
﻿