Joe Riel

9660 Reputation

23 Badges

20 years, 6 days

MaplePrimes Activity


These are replies submitted by Joe Riel

You could use the layout palette. Insert the third symbol (subliteral) in the layout palette. Replace the A with a t, the asterisk (I think that is what it, it's rather small) with a 0. That creates a subscripted t0, using xml, that behaves like a symbol (it is a symbol, not an indexed name). That's more work than I care to do. Is there a keyboard shortcut to do this? One crude way is to use the macro command. Execute macro(t_0 = t0); where the t0 is entered using the palette. Subsequently, typing t_0 (or t[0]) causes the xml symbol to be inserted.
I don't understand what you are attempting. With that in mind, a better, or at least more interesting, approach might be to use Maple to evaluate the expression you are interested in symbolically. That is,
tfrn := simplify(sum( b^j*exp(-b)/j!, j=0..n));
                                     GAMMA(n + 1, b)
                            tfrn := ---------------
                                     GAMMA(n + 1)
It's not clear what your two conditions are. As a guess,
tfr := 0.85:
basepipemin[1] := 0.2:
basepipemin[2] := 1.8:
fsolve(subs(b=basepipemin[1], trfn = tfr));
                                              0.08977917168
fsolve(subs(b=basepipemin[2], trfn = tfr));
                                              2.669480405
It isn't clear how to interpret this, n is an integer, so...
I'll guess you that you used a less-than (<) in your while statement. That interferes with the html parser; you have to enter it as `&lt;' (without the quotes). Similarly, greater-than (>) should be entered as `&gt;' and an ampersand (&) as `&amp;'. Note that there is a preview button adjacent to the post button which permits checking the displayed html before submitting
While what you say is true—most engineers don't directly use much of the math (or engineering) that they learned in school—there is plenty of opportunity to do so. I originally double majored in math and engineering but dropped the former before graduation. Working as an electrical engineer for some two decades, I have continuously learned new areas of math. Most of it was for my own interest and unrelated to the task at hand, however, I've noticed that I've been able to apply most of it to problems I've encountered. Considering your carpenter analogy, an adage seems apropos: if all you have is a hammer, everything looks like a nail.
To get them on top of each other, do
plots[display](array(1..2,1..1,[[plot(sin)],[plot(cos)]]));
In Maple11 one can use rtables, so
plots[display](Vector([plot(sin), plot(cos)]));
To get them on top of each other, do
plots[display](array(1..2,1..1,[[plot(sin)],[plot(cos)]]));
In Maple11 one can use rtables, so
plots[display](Vector([plot(sin), plot(cos)]));
Use &lt; to create a less-than sign and &gt; to create a greater-than sign: not doing so causes the truncation of your posts. You could also change the input format to "Plain Text" [click on "Input Format" below the box]. If I understand your specification (questionable, with the text truncation), then the problem you pose is not soluble, at least not with a uniform dielectric and no sources in the interior (laplacian of zero). One cannot generally specify both Von Neumann and Dirichlet boundary conditions on the same boundary segment. The analogous 1D problem is specifying both the voltage and current through a given resistor---they are not independent.
Use &lt; to create a less-than sign and &gt; to create a greater-than sign: not doing so causes the truncation of your posts. You could also change the input format to "Plain Text" [click on "Input Format" below the box]. If I understand your specification (questionable, with the text truncation), then the problem you pose is not soluble, at least not with a uniform dielectric and no sources in the interior (laplacian of zero). One cannot generally specify both Von Neumann and Dirichlet boundary conditions on the same boundary segment. The analogous 1D problem is specifying both the voltage and current through a given resistor---they are not independent.
You should use f(n), not f(k), as the second argument to fsolve. When you do, Maple is unable to compute the result.
You appeared to have used opl as the name, which is fine, so I don't see why that was an issue. The statement
for i to 4 do total := total + opl[i] end do;
will fail, with the error you gave, unless total is preassigned a value (presumably 0). The better way to sum these is to use add:
total := add(opl[i], i=1..4);
You appeared to have used opl as the name, which is fine, so I don't see why that was an issue. The statement
for i to 4 do total := total + opl[i] end do;
will fail, with the error you gave, unless total is preassigned a value (presumably 0). The better way to sum these is to use add:
total := add(opl[i], i=1..4);
Thanks for the clarification. It wasn't clear to me whether your statement indicated that binary search had been implemented in piecewise, or that it could be implemented. Congrats on moving up to fourth in the points total. Looks like you'll be passing Tom quite soon.
Thanks for the clarification. It wasn't clear to me whether your statement indicated that binary search had been implemented in piecewise, or that it could be implemented. Congrats on moving up to fourth in the points total. Looks like you'll be passing Tom quite soon.
Are you sure about that? That is neither my understanding nor my experience. Consider the following
makePW1 := proc(L::list)
local i,x;
    unapply(piecewise(seq( [x < L[i], i-1][], i = 1..nops(L))), x);
end proc:

makePW2 := proc(L::list)
    proc(x)
    uses ListTools;
        BinaryPlace(L,x,`<=`)
    end proc;
end proc:

L := [$1..100]:
f1 := makePW1(L):
f2 := makePW2(L):

time(proc() to 10^4 do f1(67.4) od end());
                                           17.410
time(proc() to 10^4 do f2(67.4) od end());
                                            1.039
The procedures are not identical, they differ for values greater than 100, but that isn't important for this comparison. Using the binary search is substantially faster. This is with Maple 11. What do you mean by "could be tagged"? Is there a way for the user to tell piecewise to use a binary search?
Are you sure about that? That is neither my understanding nor my experience. Consider the following
makePW1 := proc(L::list)
local i,x;
    unapply(piecewise(seq( [x < L[i], i-1][], i = 1..nops(L))), x);
end proc:

makePW2 := proc(L::list)
    proc(x)
    uses ListTools;
        BinaryPlace(L,x,`<=`)
    end proc;
end proc:

L := [$1..100]:
f1 := makePW1(L):
f2 := makePW2(L):

time(proc() to 10^4 do f1(67.4) od end());
                                           17.410
time(proc() to 10^4 do f2(67.4) od end());
                                            1.039
The procedures are not identical, they differ for values greater than 100, but that isn't important for this comparison. Using the binary search is substantially faster. This is with Maple 11. What do you mean by "could be tagged"? Is there a way for the user to tell piecewise to use a binary search?
First 171 172 173 174 175 176 177 Last Page 173 of 195