Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hello

I have the following procedure that uses the Lie Derivatives of a vector field to build a set of equations.

LieDerList:=proc(h::symbol,f::list,vars::list)
description "This function returns the system of equations based on the Lie derivative.":
local i,n:=numelems(vars),L:=Array(0..n):
L[0]:=h:
for i from 1 to n do
    L[i]:=inner(f,map((a,b) -> diff(b,a),vars,L[i-1])):
end do:
return(zip((w,v)->simplify(w-v),[seq(L)],[seq](cat(h,i),i=0..n))):
end proc:

Below it is an example on how to call the procedure.

I used CodeTools:-ThreadSafetyCheck to check all the procedures used within LieDerList and LieDerList itself, but nothing wrong came out. However when I try to run 

LieEq4:=Threads:-Map(w->LieDerList(x,w,[x,y,z]),models4):

where models4 is a list of 1765 elements, maple returns "Error, (in factors) attempting to assign to `LinearAlgebra:-Modular:-Create` which is protected". If I change Threads to Grid, there is no problem at all.  

What am I overlooking? Is there a method to ensure the procedure is thread-safe?

Many thanks.   

PS.  I found one problem - inner, which is related to LinearAlgebra package, is not thread-safe.  

For a lesson I'm preparing, I want to illustrate some probability concepts using Maple.
In particular, I need to use the fact that the Expectation operator(let say the Mean operator) is a linear operator with respect to random variables. 
However, I don't want to particularize my demonstration by using this or that statistical distribution but simply the notion of random variable.
I have therefore created a specific Distribution named  MinimalAbstractDistribution in which only the mean and variance are defined.

When Statistics:-Mean is applied to the expression (A*p+q) where p and q are names and A is a random variable with distribution MinimalAbstractDistribution, linearity is effectively used.
But not when it is applied to A/p or A-q.

Why that?
Is there a way of defining a statistical distribution so that Mean behaves as expected?

(You will easily understand that no workaround of the form

Mean(A+q);
eval(%, q=-q);

# or
add(Mean~([op(A-q)]))

can be accepted in a lesson).

Thanks for your attention
 

restart

with(Statistics):

 

MinimalAbstractDistribution := proc(i)
  Distribution(Mean=mu[i], Variance=sigma[i]^2)
end proc:

A := RandomVariable(MinimalAbstractDistribution(1))

_R

(1)

[Mean, Variance](A);

[mu[1], sigma[1]^2]

(2)

Mean(p*A+q);
Mean(p*(A+q))

p*mu[1]+q

 

p*(mu[1]+q)

(3)

# But

Mean(A-q);
Mean(A/p)

FAIL

 

FAIL

(4)
 

 

Download Mean_operator.mw

Can I draw such figures using Maple?

If possible please guide how I can do it.

How to evaluate the right eigenvector of a given matrix in maple?

Simple question (I'm sure) here.  I have one worksheet where the variable does not show up in the ouput of an assignment like this:

whereas I was expecting the output to include the variable being assigned like this in most other worksheets:

I am having some difficulting locating the cause (and therefore the setting) to have the behavior set back to including the variable name in the ouput.  Thanks in advance for your help.

det_roots.docx

How to find the roots of the equation ?

like if the roots of the equations are m ,n,o,p then the value of these roots in terms of λ0  λ1  λ2  λ3  µ1  µ2 and  µ3

Calculate the values of the following determinants

Windows 10 64bit

If I double click on a  file to open it from explorer  i.e. launch Maple, it is 50/50 whether Maple hangs on opening the file and I have to kill it in the Task Manager. This only happens the 1st time I try to open the file. Subsequent clicks on it will open it. If Maple is already open the problem does not happen.  The problem willl also be there after the PC is restarted. Has anyone else noticed this?

Dear Users!

I hope everyone here is fine. In the attached file I have a list of points in three dimensions. I want to plot surfaceplot (also in Dimension=2) of only those points which are less than 1.

But I want to plot the density plot for all points with the range on x-axes 5 to 15 and the range on y-axes 50-1000

Help.mw

May be someone can come up with a way to simplify this ode solution? I used the option useInt but the solution can be written in much simpler way than Maple gives.  Below is worksheet showing Maple's 2024 solution and my hand solution.

(having trouble uploading worksheet, will try again).


 

144036

ode:=diff(y(x),x)^3=y(x)+x

(diff(y(x), x))^3 = y(x)+x

maple_sol:=dsolve(ode,useInt):
maple_sol:=Vector([maple_sol]);

Vector(3, {(1) = x-Intat(3*_a^2/(_a+1), _a = (y(x)+x)^(1/3))-_C1 = 0, (2) = x-Intat(3*_a^2/(_a+1), _a = -(1/2)*(y(x)+x)^(1/3)-((1/2)*I)*sqrt(3)*(y(x)+x)^(1/3))-_C1 = 0, (3) = x-Intat(3*_a^2/(_a+1), _a = -(1/2)*(y(x)+x)^(1/3)+((1/2)*I)*sqrt(3)*(y(x)+x)^(1/3))-_C1 = 0})

mysol1:= Intat(1/(_a^(1/3) + 1), _a = (y(x) + x))=x+_C1:
mysol2:= Intat(1/( -(-1)^(1/3)*_a^(1/3) + 1), _a = (y(x) + x))=x+_C1:
mysol3:= Intat(1/( (-1)^(2/3)*_a^(1/3) + 1), _a = (y(x) + x))=x+_C1:
mysol:=Vector([mysol1,mysol2,mysol3]);

 

Vector(3, {(1) = Intat(1/(1+_a^(1/3)), _a = y(x)+x) = x+_C1, (2) = Intat(1/(-(-1)^(1/3)*_a^(1/3)+1), _a = y(x)+x) = x+_C1, (3) = Intat(1/((-1)^(2/3)*_a^(1/3)+1), _a = y(x)+x) = x+_C1})

map(X->odetest(X,ode),mysol)

 

Vector(3, {(1) = 0, (2) = 0, (3) = 0})

 


 

Download simpler_solution.mw

I keep losing the edits I do. I post screen shot. Click submit, then find all my changes are lost. Will try one more time and give up:

This is Maple solution

This is implified version

 

Both versions are verified correct by odetest. The question is there is a way to obtain the simpler form from Maple.

 

When I calculate the edge values of a matrix the result is lengthy expression that could be simplified if evaluated numerically, Why is that not done? 

THis ode looks complicated

ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;

But is actually a simple first order linear ode:

RHS:=solve(ode,diff(y(x),x));
new_ode:=diff(y(x),x)=RHS;

Whose solution is 

But Maple gives this very complicated answer as shown below. When asking it to solve as linear ode, it now gives the much simpler solution.  

Maple complicated solutions are all verified OK. But the question is, why did it not give this simple solution?

Attached worksheet.  All on Maple 2024


 

204152

restart;

204152

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1700. The version installed in this computer is 1693 created 2024, March 7, 17:27 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;

(1/2)*(2*x^(5/2)-3*y(x)^(5/3))/(x^(5/2)*y(x)^(2/3))+(1/3)*(-2*x^(5/2)+3*y(x)^(5/3))*(diff(y(x), x))/(x^(3/2)*y(x)^(5/3)) = 0

DEtools:-odeadvisor(ode);

[[_1st_order, _with_linear_symmetries], _exact, _rational]

#why such complicated solutions?
sol:=[dsolve(ode)];

[y(x) = (1/3)*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*(-(1/4)*5^(1/2)-1/4-((1/4)*I)*2^(1/2)*(5-5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*(-(1/4)*5^(1/2)-1/4+((1/4)*I)*2^(1/2)*(5-5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*((1/4)*5^(1/2)-1/4-((1/4)*I)*2^(1/2)*(5+5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*((1/4)*5^(1/2)-1/4+((1/4)*I)*2^(1/2)*(5+5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), x/y(x)^(2/3)+y(x)/x^(3/2)+c__1 = 0]

#all solution are correct
map(X->odetest(X,ode),sol);

[0, 0, 0, 0, 0, 0]

RHS:=solve(ode,diff(y(x),x));
new_ode:=diff(y(x),x)=RHS;

(3/2)*y(x)/x

diff(y(x), x) = (3/2)*y(x)/x

dsolve(new_ode);

y(x) = c__1*x^(3/2)

#force it to solve it as first order linear ode
dsolve(ode,y(x),[`linear`])

y(x) = c__1*x^(3/2)


 

Download why_missed_simple_solution_march_17_2024.mw

I cannot figure out which operand(?) is substituded here

subs(1 = 2, a*b);
                              2  2
                             a  b 

Same for

subs(1 = 3, a + b);
                           3 a + 3 b

but

subs(1 = 2, a/b);
                                2
                               a 
                               --
                               b 

subs(1 = 3, a - b);
                            3 a - b

Is this by design?

Maple's coulditbe  is useful. But unfortunately it does not return back to the user the conditions under which the proposition was found true. This could make it much more useful. It seems in way similar to Mathematica' Reduce but Reduce returns the conditions.

Is there a way to find the conditions which makes it true? 

I use coulditbe alot. I use it to verify that the result of odetest (I call it the residue) is zero or not. Maytimes, odetest does not return zero. And using simplify, or evalb or is to check if the residue is zero, all fail. But many times, coulditbe returns true, meaning the residue is zero. But I do not know under what conditions. In Mathematica's Reduce, it tells me the conditions. 

Here is one of hundreds of examples I have

restart;
ode:=(t^3+y(t)^2*sqrt(t^2+y(t)^2))-(t*y(t)*sqrt(t^2+y(t)^2))*diff(y(t),t)=0;
ic:=y(1)=1;
sol:=dsolve([ode,ic]);
the_residue:=odetest(sol,[ode,ic]);

You see, odetest says it could not verify the solution (the first entry above) but it did verify the solution against the initial conditions. 

Using simplify, evalb and is all also could not verify it

simplify(the_residue[1]);
evalb(the_residue[1]=0);
is(the_residue[1]=0);

Now coulditbe does:

_EnvTry:='hard':
coulditbe(the_residue[1]=0);

So the solution is correct, but I do not know under what conditions. Using Mathematica's Reduce I can find this:

So now back in Maple, I can do this

simplify(the_residue[1]) assuming t>exp(-2*sqrt(2)/3);

                      0

Actually in this example, just using assume t>0 also gives zero. But I am using Mathematica's result for illustration.

You might ask, why do I need to know for what values of the independent variable is the residue zero?

Because in some cases, the residue is zero only at single point! So it does not make sense to say the solution is verified to be correct only at one single point of the domain, right?

it needs to be some finite range at least. Here is an example of an ode whose solution is correct only at x=0

ode:=diff(y(x),x)=3*x*(y(x)-1)^(1/3);
ic:=y(3)=-7;
sol:=dsolve([ode,ic]);
the_residue:=odetest(sol,[ode,ic]);

And simplify, evalb, is all fail to verifiy this, but coulditbe says true

simplify(the_residue[1]);
evalb(the_residue[1]=0);
is(the_residue[1]=0);
_EnvTry:='hard':
coulditbe(the_residue[1]=0);

So now, we ask, is this solution then correct or not? It turns out to be zero but only at origin x=0

plot(abs(the_residue[1]),x=-1..1)

If I knew that residue is zero only at single point, then I would say this solution is not correct, right?

And that is why I need to know under what conditions coulditbe retruned true.

I tried infolevel[coulditbe]:=5 but nothing more was displayed on the screen.

Mathematica's Reduce confirms that when x=0 the residue is zero.

So my question is simply this: Can one obtain the conditions used by coulditbe to determine when result is true?

It will be useful if Maple could in future version return the value/range which makes it true.

 

I asked a question a while ago

https://www.mapleprimes.com/questions/235734-How-Can-The-Functional-Derivativevariation

Which did not get any immediate responses but one late one which i had replied to, but nothing else since then. 

Is it appropriate to delete and repost and try to get more responses/exposure and see if anyone else has any ideas? 

Since @ecterrab is the one who responded I consider this an interesting problem that I would like to continue discussing. 

First 12 13 14 15 16 17 18 Last Page 14 of 347