Ronan

1311 Reputation

14 Badges

12 years, 315 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

@Scot Gould Thank you. I will experiment with that. 

@Christopher2222 This is just a guess. Possibly the recent files only gets updated when one shuts down Maple. A sudden power failure, would not have time to do that. I know from using Solidworks, the settings etc are not saved until the one exits and restarts the program. So if one has changed some settings and then a crash they are lost. 

I tried  eliminating pairs [x,y] ,[ x,z] and [y,z]. That doesnt give a consistant answer though but maybe it will shed some light on the issue.

restart;

expr1:=a^2  =4*y*z/((x + y)*(x + z))

 

a^2 = 4*y*z/((x+y)*(x+z))

(1)

expr2:=b^2= 4*z*x/((y + z)*(y + x))

b^2 = 4*z*x/((y+z)*(x+y))

(2)

expr3:=c^2= 4*x*y/((z + x)*(z + y))

c^2 = 4*x*y/((x+z)*(y+z))

(3)

elm1:=eliminate({expr1,expr2,expr3},[x,y])

[{x = -z*(a^2*c^2-2*a^2-2*b^2-2*c^2+8)/(a^2*c^2-4*a^2), y = (a^2-b^2-c^2+4)*(a^2*c^2-2*a^2-2*b^2-2*c^2+8)*z/(a^2*(a^2-b^2+c^2-4)*(c^2-4))}, {(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}]

(4)

elm2:=eliminate({expr1,expr2,expr3},[x,z])

[{x = -y*(a^2*b^2-2*a^2-2*b^2-2*c^2+8)/(a^2*b^2-4*a^2), z = b^2*y*(a^2-b^2-c^2+4)/(a^2*b^2+b^4+b^2*c^2-4*a^2-8*b^2-4*c^2+16)}, {(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}]

(5)

elm3:=eliminate({expr1,expr2,expr3},[y,z])

[{y = -a^2*x*(a^2+b^2-c^2-4)/(a^4+a^2*b^2+a^2*c^2-8*a^2-4*b^2-4*c^2+16), z = x*(a^2*c^2-2*a^2-2*b^2-2*c^2+8)/(-a^2*c^2+4*c^2)}, {a*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}]

(6)

elm1[2]-elm2[2]

{(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}-{(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}

(7)

simplify( (7) );

0

(8)

elm1[2]-elm3[2]

{(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}-{a*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}

(9)

simplify( (9) );

{(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)*(a^2-4)}-{a*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}

(10)

elm2[2]-elm3[2]

{(a-2)*(a+2)*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}-{a*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}

(11)

simplify( (11) );

{(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)*(a^2-4)}-{a*(a*b*c+a^2+b^2+c^2-4)*(-a*b*c+a^2+b^2+c^2-4)}

(12)
 

 

Download 2024-21-31_eliminate_test.mw

@acer  Yes SetMetric is a good way of avoiding accidently changing the Metric. Why use Metric:=copy(M) instead of Metric:=M?

@nm I was completly unaware of option object. This is a level of coding I have never come across. I know I didn't state this  or put it in the example given. I am using option package which it turns out can't be used with object.  When I put my example together, I thought, "I don't need that for this question".

I need to have a default value for the Metric matrix when the package is loaded. Can the object concept be used  inside a package? Is there any other way in this case? 

Globals may be bad, but I have used quite a few of them. I admit my thinking may be limited.


 

@Joe Riel  I like that. Both comments (now answers ) are helpful to know.

@Joe Riel Thanks. Had tried with no forward quotes at all previously. I find it rather subtle when to use and not to use them.

@vv I have seldom used  odes in Maple so couldn't really attempt a solution. Just for visual effect I added these few lines to your code to see the paths in 3D.

plt0:=plots:-display(plottools:-tetrahedron(convert~([a0,b0,c0,d0],list)),color="White",transparency = 0.7):
plt1:=plots:-odeplot(sol, [aX(t),aY(t),aZ(t)], t=0..0.81, color=red):
plt2:=plots:-odeplot(sol, [bX(t),bY(t),bZ(t)], t=0..0.81, color=green):
plt3:=plots:-odeplot(sol, [cX(t),cY(t),cZ(t)], t=0..0.81, color=blue):
plt4:=plots:-odeplot(sol, [dX(t),dY(t),dZ(t)], t=0..0.81, color=purple):
plots:-display(plt0,plt1,plt2,plt3,plt4,scaling =constrained)

I asked a similar question a few years age. See Can a different Document or Worksheet template be created - MaplePrimes

@Kitonum Yes. That is basically  how I have being using gcd. But it is good to be reminded of the basics

This is part of a procedure I use for reducing vectors, lists, mactrices and expressions to remove common factors. Wondering now if frontend can be more efficiently combined into this. I hadn't thought about frontend when asking the quesdtion earlier on. 

proc(v::{list,Vector})
option overload;
         description " removes linear factor";
uses LinearAlgebra;
         local i, num,tgdc,dnm, V1;
        
            num:=`ifelse`(type(v,Vector),numelems(v),nops(v));
            dnm:=frontend(lcm, [seq(denom(v[i]),i=1..num)]);
            V1:=simplify(v*~dnm);
            tgdc:=V1[1];
            for i from 2 to num do
               tgdc:=frontend(gcd, [tgdc, V1[i]]);
            end do;
            return [tgdc/dnm, simplify(V1/~tgdc)];
end proc,

 

@Carl Love Thank you. Thak will make things so much simpler.

@acer Out of interest how did you discover/find the hidden character?

@mmcdara true/false is a valid answer for me. I was only solving for alpha as I couldn't think of any other way to derermine an asnwer.

@dharr  I see I tried it the wrong way around.

@acer  Thank you for pointing that out. I should try in future.

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