Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

@mschneider What you've found is not a fix. The correct response in this situation is to use fnormal. For example:

a := exp(2);
b := (exp(1))^2;

for i to 25 do
precision := 10+i:
a-b=fnormal(evalf(a-b));
end do;

or

K:=2;
answer := 5*exp(7.5*t);
response := subs(a = exp(1), 5*a^(7.5*t));
a := evalf(subs(t = Pi, answer),Digits+K);
b := evalf(subs(t = Pi, response), Digits+K);
fnormal(a-b, Digits);

Thumb if You like.

Your low Digits settings is incurring this significant error. Increase it to 25.


  H := (-lambda + sqrt(-Omega)*{tan(sqrt(-Omega)*xi) + sec(sqrt(-Omega)*xi)})/(2*v - 2);
#should be 
  H := (-lambda + sqrt(-Omega)*(tan(sqrt(-Omega)*xi) + sec(sqrt(-Omega)*xi)))/(2*v - 2);

Thumb if You like.

Replace output='Q' with output=':-Q'.


Thumb if You like.

This procedure lets you append your parameters.

F := proc (f) 
   local F, A;
   subs('F' = f, 'A' = args[2 .. -1], () -> F(A, args))
end proc;

F(f, 3, 4); F(f, 3, 4)(z);
F(f, 3); F(f, 3)(y, z);

 

Thumb if You like.

 

Do you mean like this: 'sin(0)' ?

You must introduce a coordinate first.
 

A := diff(phi(((8*R^(3/2) - W)*sqrt(2))/(24*sqrt(M))), `$`(W, 2)) = lambda*phi(((8*R^(3/2) - W)*sqrt(2))/(24*sqrt(M)));
map2(op, 1, indets(A, function));
S := % =~ ([x || (`$`(1 .. nops(%)))]);
subs(S, A);
dsolve(%);
subs(map(rhs = lhs, S), %);


Thumb if You like.

Example:
plottools[transform]((x, y) -> [x+1, y+1])(YourPlotGoesHere);
#Edit
display(plottools[translate](YourPlotGoesHere, 1, 1 ), V);

See all of :
?plottools[transform]
?plottools[translate]
?plottools[rotate]
?plottools[reflect]
?plottools[scale]

Thumb if You like.

Do you mean :
plot3d(U, x = -10 .. 10, t = -10 .. 10);
#or
plot3d(U, x = -10 .. 10, t = -10 .. 10, view=[DEFAULT, DEFAULT, -10..10]);

I do not understand why you expect the coefficients to ordered in any way. Use this:

f := (x, y) -> (295849/5841396)*x^2-(29441/324522)*y*x+(33995/216348)*y^2-(5989/14751)*x+(3635/4917)*y+1; 
F := proc(P :: polynom, v :: set, V :: list, N :: list)
local C, M, i, j;
  C := coeffs(f(x, y), v, M);
  seq(`if`(member(op(i, [M]), N, 'j'), op(j, V) = op(i, [C]), NULL), 
  i = 1 .. nops([M]));
end proc;
F(f(x,y), {x,y}, [A, B, C, D, E, F], [x^2, y*x, y^2, x, y, 1]);
F(f(x,y), {x,y}, [A, C], [x^2, y^2]);

Thumb if You like.

`@`(Q -> simplify(Q, [x = 2*Pi*w]), simplify, Q -> simplify(Q, [2*Pi*w = x]))( sin(4*Pi*w)/sin(2*Pi*w) );
#interestingly
sin(4*x)/sin(2*x);
simplify(%);

 

Thumb if You like.

This code does it:

abCaseSet := {[`0<a<1`, `0<b<1`], [`0<a<1`, `b=-1`], [`0<a<1`, `b=0`], [`0<a<1`, `b=1`], [`0<a<1`, `1<b<&infin;`], [`0<a<1`, -`1<b<0`], [`0<a<1`, -`&infin;<b<-1`], [`a=-1`, `0<b<1`], [`a=-1`, `b=-1`], [`a=-1`, `b=0`], [`a=-1`, `b=1`], [`a=-1`, `1<b<&infin;`], [`a=-1`, -`1<b<0`], [`a=-1`, -`&infin;<b<-1`], [`a=0`, `0<b<1`], [`a=0`, `b=-1`], [`a=0`, `b=0`], [`a=0`, `b=1`], [`a=0`, `1<b<&infin;`], [`a=0`, -`1<b<0`], [`a=0`, -`&infin;<b<-1`], [`a=1`, `0<b<1`], [`a=1`, `b=-1`], [`a=1`, `b=0`], [`a=1`, `b=1`], [`a=1`, `1<b<&infin;`], [`a=1`, -`1<b<0`], [`a=1`, -`&infin;<b<-1`], [`1<a<&infin;`, `0<b<1`], [`1<a<&infin;`, `b=-1`], [`1<a<&infin;`, `b=0`], [`1<a<&infin;`, `b=1`], [`1<a<&infin;`, `1<b<&infin;`], [`1<a<&infin;`, -`1<b<0`], [`1<a<&infin;`, -`&infin;<b<-1`], [-`1<a<0`, `0<b<1`], [-`1<a<0`, `b=-1`], [-`1<a<0`, `b=0`], [-`1<a<0`, `b=1`], [-`1<a<0`, `1<b<&infin;`], [-`1<a<0`, -`1<b<0`], [-`1<a<0`, -`&infin;<b<-1`], [-`&infin;<a<-1`, `0<b<1`], [-`&infin;<a<-1`, `b=-1`], [-`&infin;<a<-1`, `b=0`], [-`&infin;<a<-1`, `b=1`], [-`&infin;<a<-1`, `1<b<&infin;`], [-`&infin;<a<-1`, -`1<b<0`], [-`&infin;<a<-1`, -`&infin;<b<-1`]};

map([proc(L)
local i;
    seq(
    (proc(x, f, y)
      if member(f, {`<`, `<=`, `=`, `>`, `>=`}) then f(x, y) end if;
    end proc)(op(i - 1 .. i + 1, L)), i = 2 .. nops(L) - 1)
  end proc], parse(
  (proc(X)
local L, S;
    S := convert(X, string);
    for L in [["`", ""], ["&infin;", "infinity"], ["<=", ", `<=`, "],
      ["<", ", `<`, "], [">=", ", `>=`, "], [">", ", `>`, "], ["=", ", `=`, "]
      ] do S := StringTools:-SubstituteAll(S, op(L))
    end do
  end proc)(abCaseSet)));

 

@Luca3544 Are you trying to make your procedure to do a print out of a search? If so then attach "NULL;" as last statement to the procedure code.

M := proc(a)
local Grundstof, c;
description "Side 302, 303";
  c := convert(a, string);
  Grundstof := [(1.0079*g)/(mol) + "H", (4.0026*g)/(mol) + "He",
  (6.941*g)/(mol) + "Li", (9.0122*g)/(mol) + "Be", (g)/(mol),
  (10.811*g)/(mol) + "B", (12.0107*g)/(mol) + "C", (14.0067*g)/(mol) + "N",
  (15.9994*g)/(mol) + "O", (18.9984*g)/(mol) + "F", (22.990*g)/(mol) + "Na",
  (24.305*g)/(mol) + "Mg"];
  # (proc(E, n, s) if has(E, s) then print(E); n fi end)~(Grundstof, [$1..nops(Grundstof)], c);
  # or
  map(proc(n, c) if has(args) then print(n) fi end, Grundstof, c);
  NULL;
end proc;

 

That should be "assuming 0 < k[2];"

I do not believe you can define an assumption like "for all i k[i] is positive".

 

f1 := unapply(diff(g1, x), x);

or

gf := unapply(g1, x);
f1 := D(gf);


Thumb if You like.

4 5 6 7 8 9 10 Last Page 6 of 15