Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are answers submitted by Carl Love

Since you've been here on MaplePrimes many times before and the solution to this system is straightforward (no singularities, convergence issues, etc.), I wonder what difficulty you encountered.

restart:
Eq1:= 
   diff(F(eta),eta$4) - 
   M*(eta*diff(F(eta),eta$3) + 3*diff(F(eta),eta$2) + 
      diff(F(eta),eta)*diff(F(eta),eta$2) - F(eta)*diff(F(eta),eta$3)
   ) - 
   Ha^2*diff(F(eta),eta$2)
:
Eq2:= 
   diff(G(eta),eta$2) + 
   Pr*M*(F(eta)*diff(G(eta),eta) - eta*diff(G(eta),eta)) +
   Pr*Ec*diff(F(eta),eta$2)^2 + Nb*diff(H(eta),eta) + 
   diff(G(eta),eta) + Nt*diff(G(eta),eta)^2
:
Eq3:= 
   diff(H(eta),eta$2) + M*Sc*(F(eta)*diff(H(eta),eta) - eta*diff(H(eta),eta)) +
   Nt*diff(F(eta), eta, eta)/Nb
: 
IC1:= F(0) = 0, (D@@2)(F)(0) = 0, D(G)(0) = 0, D(H)(0) = 0:
IC2:= F(1) = 1, D(F)(1) = 0, G(1) = 1, H(1) = 1:
 
params:= {Ec = .1, Nt = .1, Nb = .1, Sc = .5, Pr = 10, M = .5}:
HA:= [0, 2, 4, 6, 8]:

for k to nops(HA) do
   P||k:= plots:-odeplot( 
      dsolve(eval({Eq||(1..3), IC||(1..2)}, params union {Ha= HA[k]}), numeric),
      [[eta, F(eta)], [eta, G(eta)], [eta, H(eta)]],
      linestyle= [1,2,3],
      color= [red, blue, green, black, purple][k]
   )
end do:
plots:-display(P||(1..nops(HA)));

There's a simple trick that let's you exploit the internal representation of an Array to get what you want:

[rtable_elems(DataName)[]];

How about

plots:-polarplot([[r, 0, r= 0..1], [r, Pi/6, r= 0..1]], color= magenta, thickness= 6);

How about

plot([seq(-arctan(2*m*x)/(1-x^2), m= 1..10)], x= 0..10, discont);

It is always dangerous and unreliable to expect terms or factors to appear in a certain order. Isn't the result that you want the same as would would get from simply simplify(dairihensu1)?

To list the first 10 prime Leyland numbers, use

select(isprime, {seq(seq(a^b+b^a, a= 2..99), b= 2..99)})[1..10];

Some guess work was required to come up with the 99; it's much larger than is needed, but Maple's integer arithmetic and primality testing are so fast that it doesn't matter. Note that putting integers into a set automatically sorts them.

Here's a one-line solution:

cnt:= Statistics:-Tally(op~([g[]]), output= table);

This produces table output, like Joe's.

Consider creating a Matrix with an initializer function, like this:

v:= Matrix((5,9), (i,j)-> F(V__dot[i], DD[j]));

where F represents any operation that you want. In your case, I think that you want

v:= Matrix((5,9), (i,j)-> V__dot[i]/(Pi/4)/DD[j]^2);

While entering the command, you should use Shift-Enter to get to the next line. Only use Enter when the command is complete. Thus, in the code portions of most worksheets, Shift-Enter would be more commonly used than Enter.

Download DirectSearch from the Maple Applications Center. I gave a more-complete Answer to your simultaneous Question on StackOverflow.

I'm on my mobile right now. I'll give your problem a more-thorough look when I get to a real computer. 

Use the solve command. See ?solve. If the equation is too complicated to solve symbolically, you can still get a numeric solution with fsolve if the equation has no symbolic parameters. 

A slightly ugly solution is to use $ in prefix form:

Array(`$`(1..3, n));

But, then again, everything is ugly in 2-D input, so maybe it doesn't matter. You should use 1-D input. To change your default format to 1-D input: Using the menus, do

  • Tools => Options => Display => Input display => Maple Notation
  • Interface => Default format for new worksheets => Worksheet
  • Apply Globally.

Good Question; Vote Up.

I don't have a great amount of experience with the Units package, but my experience so far has been that trying to assign units to symbolic entities (such as your t and x(t)) is clunky at best and ultimately frustrating and perhaps not worth the effort. That being said, here's what I managed to come up with for your situation:

restart:
with(Units:-Standard):
x:= t-> 'procname'(t)*Unit('m'):
t:= ()-> 'procname'*Unit('s'):
#Note that diff is overloaded/replaced by the with(Units:-Standard).
diff(x(t),t());

This produces precisely the result that you requested, but note that the second argument to diff is t() rather than t.

The first proc procedure in your code is not assigned to anything. It needs to be assigned to p, as in p:= proc(....

Fixing this error will get you the first three plots. Another error occurs after that, and I haven't figured that one out yet.

Good Question; Vote up.

Here's a simple recursive conversion of tables to sets followed by Maple's normal equality check (which works well for sets but not for tables). The conversion to sets is different from that performed by convert(..., set) because it includes the indices.

TableToSet:= T-> `if`(T::table, {op(2, thisproc~(T))[]}, T):
TablesEqual:= (A::table, B::table)-> 
   evalb(TableToSet(A) = TableToSet(B))
:

 

First 206 207 208 209 210 211 212 Last Page 208 of 395