Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

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.

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.

1 2 3 4 5 6 7 Last Page 1 of 10