Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 359 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

Yes, the command is PDEtools:-difforder.

You need to explicitly put a multiplication symbol between x and y, and between 3 and x:

implicitplot(x^3+y^3-3*x*y=0,x=-3..3,y=-3..3, scaling=constrained);

Change and to a semicolon (;). Put a colon (:) or semicolon after the end do.

Acer's answer explains why your A3 doesn't work. I will explain why your A2 doesn't work. A2 will match expressions that literally contain `or` and whose left argument is integer and whose right argument is rational. (Since `or` will reject as erroneous any explicitly non-Boolean input such as numbers, this type can never be matched.)

Here's an example of a valid use of lowercase or as a type:

TypeTools:-AddType(A2, symbol or indexed):
type(y or s[2], A2);

     true
type(s[2] or y, A2);
    
false

@smith_alpha 

Yes, I see your PS now. The output generated by "cmaple inputfile > outputfile" is not meant to be reread by a computer; it is strictly for human reading. If you are writing a file that is strictly meant to be reread by Maple, then the save command is by far the easiest way to do it: no formatting necessary and the reread values are automatically assigned to the correct variable names. Otherwise, use writedata or fprintf.

I think that you'd be better off using the command ImportMatrix, which understands the format "comma-separated values" through the parameter source= csv.

The assignment

x[anything]:= anything;

turns x into a table. Change x[s] to x_s or x__s.

A Horner-form for loop is probably the most efficient way, despite your distaste for it.

r:= rand();

L:= convert(r, base, 10):

S:= L[-1]: for k from 2 to nops(L) do S:= S*10+L[-k] end do: S;

     22424170465

However, there is also a library way to do it:

convert(L, base, 10, 10^nops(L))[];

     22424170465

 

N:= proc(m::posint)
local P:= 1, p:= 1, k;
     for k to m do
          p:= nextprime(p);
          P:= P*p
     end do;
     P+1
end proc:
M:= [$1..15]:
P:= N~([$1..15]):
SmallestPrimeFactor:= (n::posint)-> ifactors(n)[2,1,1]:
interface(rtablesize=16):
H:= < m | N[m] | S[m] | p[m] >:
<H, < <M[]> | <P[]> | <SmallestPrimeFactor~(P)> | <ithprime~(M)> >>;

You need to use diff consistently for derivatives. You correctly have diff(C(t), t) but expressions like d/dt and d*diff(n(t),t)/dt are meaningless. For a second derivative, use diff(n(t),t,t) or diff(n(t),t$2).

Yes, it is something simple. Don't use capital D as a variable. It is the functional differentiation operator.

restart:
assume(xi::real, eta::real):
phi:= (2*xi-1)*(xi-1)*(2*eta-1)*(eta-1):
Grad:= <diff(phi, xi), diff(phi, eta)>;

v:= <0,1>:
int(Grad.v, eta);

int(Grad.v, xi);

Hint: Continuity at  x = 0 means that the limit from the right and the limit from the left are equal and that these equal beta. In Maple, that means

limit(f, x= 0, left) = limit(f, x= 0, right);

This gives you an equation that you can solve numerically for alpha with the fsolve command.

Yes, you can manipulate inequalities exactly like equations. But three-part inequalities and three part equations are not allowed. Unfortunately, Maple will let you enter expressions such as (a<b) < c or (a=b) = c, but these operators are not associative! The expressions are essentially nonsense to Maple.

InertForm:-Display(InertForm:-Parse("2+3"));

 

First 284 285 286 287 288 289 290 Last Page 286 of 395