Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

The condition is always satisifed.

vars:=[x,y,z];
for invars in vars do
[cat(invars, 1..nops(vars))]
end do;

or

for invars in vars do
[(n->n||(1..nops(vars)))(invars)]
end do;

or

(n->n||(1..nops(vars)))~(vars) 

Thumb if You like.

I think you want to do this:

map(proc(P, V)
   local c, C, v;
   coeffs(P, V, 'c');
   [seq([seq(type(C, dependent(v)), v = V)], C = [c])];
end proc, eq, incog);
subs([true = 1, false = 0], %);

#also
Matrix(map(op, %));


Thumb if You like.

 

That should be

f:=unapply(3*x+2, x);
g:=D(f);
g(3);

Thumb if You like.

Your vectors are always linearly dependent:

Matrix([[cos+I*sin, 1], [1, cos-I*sin]](t));
map(expand@convert, %, exp);
simplify(LinearAlgebra:-Determinant(%));

Thumb if You like.

Look under
?plot, options
?plot3d, options

Search for transparency

I wonder if the following is correct. This is the second formula:
 

T0 := proc(a, d) 1 - exp(-d*a^2) + 1/3*d*(2*a^3 - 3*a^2 + 1) end proc;
T1 := proc(d) if d <= 0 then 1 - exp(-d) else 1/3*d end if; end proc;
T2 := proc(d)
  if evalf(d < 3 + LambertW(-3*exp(-3))) then 1/3*d else 1 - exp(-d) end if;
end proc;
T3 := proc(d)
  map(T0, [Re(evalf(RootOf(exp(-d*_Z^2) + _Z - 1, (1)/(d) .. (2*LambertW(-1, - 1/2*exp((-1)/2)) + 1)/(2*LambertW(-1, - 1/2*exp((-1)/2)))
  ))), Re(evalf(RootOf(exp(-d*_Z^2) + _Z - 1, (2*LambertW(-1, - 1/2*exp((-1)/2)) + 1)/(2*LambertW(-1, - 1/2*exp((-1)/2))) .. 
  1)))], d);
  min(op(%));
end proc;
T4 := proc(d)
  if evalf(d < - (2*LambertW(-1, - 1/2*exp((-1)/2))^2)/(2*LambertW(-1, - 1/2*exp((-1)/2)) + 1)
    ) then
    T1(d)
  else
    min(T2(d), T3(d))
  end if;
end proc;

plot(T4,  2..5);
plot(T4,  -2..3);

#The above is
expr := exp(-d*a^2) - 1/3*d*(2*a^3 - 3*a^2 + 1);
sought := 1 - max(expr);
expr := 1 - expr;
sought := min(expr);
#where 0<=a<=1

Thumb if You like

For infinum you can use minimize:

minimize(exp(a*(d-1)), a = 0..1);
convert(1-minimize(exp(d*(a-1)), a = 0..1), piecewise, d);
plot(%, d = -2..2, thickness = 2);

 

Thumb if You like.

@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.

First 10 11 12 13 14 15 16 Last Page 12 of 22