Oliveira

180 Reputation

3 Badges

9 years, 324 days

MaplePrimes Activity


These are questions asked by Oliveira

Does anyone know how to enter in the pdsolve function Dirichlet conditions and Neumann values?

Oliveira.


 

``

  Note: To enter units, I used the unit key (blue) in the Units palette.

  When I use the combine and simplify functions to manipulate temperature units, Maple returns a wrong answer, as we can see below;

combine(20*Unit(Unit('Celsius'))+30*Unit('K'), units)

50*Units:-Unit(K)

(1)

simplify(20*Unit(Unit('Celsius'))+30*Unit('K'))

50*Units:-Unit(K)

(2)

  The quantity 20 Celsius is not converted correctly. However, for other types of dimensions, the combine and simplify functions work correctly.

combine(10*Unit('m')+120*Unit('cm')+200*Unit('ft'), units)

(1804/25)*Units:-Unit(m)

(3)

simplify(10*Unit('m')+120*Unit('cm')+200*Unit('ft'))

(1804/25)*Units:-Unit(m)

(4)

``

Another strange thing happens with the convert function, with temperature units. When we use the same source unit, the convert function deletes the unit, leaving only the quantity.

convert(30*Unit('K'), temperature, Unit('K'))

30

(5)

 I do not understand why this occurs.

convert(10*Unit('m'), units, Unit('m'))

10*Units:-Unit(m)

(6)

I do not understand why this occurs.

 

Oliveira


 

Download Matching_units.mw

In the DE solution below I cannot convert the RootOf function to radicals.
macro(solve = allvalues@solve);
_EnvExplicit := true;
de := x^4*diff(y(x), x $ 2) + omega^2*y(x) = 0;
bc := y(a) = 0, y(b) = 0, D(y)(a) = 1;
dsol := (dsolve({bc, de}, {omega, y(x)}) assuming (0 < a, a < b));
convert(dsol, radical);
{omega = RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b, y(x) = x*(-cos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b/x)*sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b*_C2/a) - arccos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b*_C2/a))*a/(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b) + sin(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b/x)*_C2)}

Does anyone know how to convert the above expression to radicals?
I'm grateful.
Oliveira
RootOf_to_radical.mw
 

In the DE solution below I cannot convert the RootOf function to radicals.

macro(solve = `@`(allvalues, solve))

_EnvExplicit := true

de := x^4*(diff(y(x), `$`(x, 2)))+omega^2*y(x) = 0

bc := y(a) = 0, y(b) = 0, (D(y))(a) = 1

dsol := `assuming`([dsolve({bc, de}, {omega, y(x)})], [a > 0, b > a])

convert(dsol, radical)

{omega = RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b, y(x) = x*(-cos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b/x)*sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b*_C2/a)-arccos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b*_C2/a))*a/(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b)+sin(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b/x)*_C2)}

(1)

Does anyone know how to convert the above expression to radicals?
I'm grateful.

Oliveira


 

Download RootOf_to_radical.mw

 

When I apply the uses function with the Physics package in a procedure, the commands in this package are not restricted to the inside of the procedure, but are applied globally. See the example below:

gds := proc(LL, qi, t)

 local ta,i;  

uses Physics;

ta := sec(diff(diff(LL, diff(qi[i](t), t)), t), i = 1 .. nops(qi));

RETURN(ta) end:

sxy := diff(x(t), t)^2 + diff(y(t), t)^2:

gds(sxy, [x, y], t);

Error, (in Physics:-diff) name expected for external function
 

On the other hand, when I apply the uses function with the LinearAlgebra package in a procedure, the commands in this package are restricted to the inside of the procedure only.
dst:=proc(MM) 

local DA; 

uses LinearAlgebra;

DA:=Determinant(MM); 

RETURN(DA) end:

dst(<<1 | 2>, <3 | 4>>);

                  -2

Determinant(<<1 | 2>, <3 | 4>>);

                         Determinant(Matrix(2, 2, [[1, 2], [3, 4]]))

This could be a bug in Maple 2019?

The following differential equation:

sy := (dsolve({T*diff(y(x), x, x) + rho*omega^2*y(x) = 0, y(0) = 0, y(L) = 0}, y(x)) assuming (0 < T, 0 < omega, 0 < rho))

                                                                 sy:=y(x)=0

Maple only returns the trivial solution. Should return other expressions:
Thank you

3 4 5 6 7 8 Page 5 of 8