MaplePrimes Questions

I have a question with a proc containing "if" statement. 
i want maple to do the calculations without just like Heaviside function does. how can it be done?is it possible?

restart

f1:=proc(x)
if x>=0 then 1
else 0
fi:end proc:

Matrix(2,[[f1(x)+2,2*f1(x)],[5,4]]);

Error, (in f1) cannot determine if this expression is true or false: 0 <= x

 

P:=f1(x)*exp(x)+5*x;

Error, (in f1) cannot determine if this expression is true or false: 0 <= x

 

diff(P,x)

0

(1)

 

 


but i can do all of the above with Heaviside(x). can i do the same with my procedure?

Download if.mw

Maple can't solve the following symbolic integration for me and it remains in the state of evaluating when I use simplify and nothing happens after hours.. any solution? 

I was thinking maybe there is something wrong with my maple !!?

 

eq0:=R__i=(1/2)*d+L__1;
eq00:=R__f=c+(1/2)*d+L__1;
eq39:=R(beta)=R__i+2*beta*(R__f-R__i)/Pi;
eq39a:=simplify(subs([eq0,eq00], eq39));
eq38:=R__max(theta,beta)=R__max(theta,0)*(R(beta)/R__i);
eq41:=R__max(theta,0)=((2*L__1*cos(theta)) + sqrt(d^2 - 2*(L__1)^2 + 2*(L__1)^2*cos(2*theta)))/2;
eq38a:= simplify(subs([eq41,eq39a,eq0], eq38));

R__i = L__1+(1/2)*d

 

R__f = c+(1/2)*d+L__1

 

R(beta) = R__i+2*beta*(R__f-R__i)/Pi

 

R(beta) = L__1+(1/2)*d+2*beta*c/Pi

 

R__max(theta, beta) = R__max(theta, 0)*R(beta)/R__i

 

R__max(theta, 0) = L__1*cos(theta)+(1/2)*(d^2-2*L__1^2+2*L__1^2*cos(2*theta))^(1/2)

 

R__max(theta, beta) = (1/2)*(2*L__1*cos(theta)+(d^2-2*L__1^2+2*L__1^2*cos(2*theta))^(1/2))*(2*L__1*Pi+Pi*d+4*beta*c)/(Pi*(2*L__1+d))

(1)

eq44 := v__m(beta) = 1/int((1 - r^2/R__max(theta, beta)^2)*r, [r = 0 .. R__max(theta, beta), theta = 0 .. 2*Pi]);

v__m(beta) = 4/(int(R__max(theta, beta)^2, theta = 0 .. 2*Pi))

(2)

eq44a:=simplify(subs(eq38a,eq44));

``


Download int.mw

 

linkedlist.zip

I am having a problem understanding how to pretty print the results of a procedure incorporated into a module installed as a package using the maple workbook(.maple).  In an effort to understand how this should be done, I installed the LinkedListPackage from the example code using a maple workbook to see if the package works as shown in the help files. The results from this exercise confirmed the problem I am having with a module I am creating. Specifically, as shown in the help file, I assigned the exported name “nil” to L; ie. L := nil; Note that the result is L:= linkedlist:-nil not L:= nil.  Furthermore when I create a linked list the results are as shown below:  

L := ``(1, linkedlist:-nil)
L := ``(2, ``(1, linkedlist:-nil))
L := ``(3, ``(2, ``(1, linkedlist:-nil)))
L := ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))
L := ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))
L := ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))
L := ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))
L := ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))
L := ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))))
L := ``(10, ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))))

I realized that nil is an exported local variable which is being reflected in how it presents in the worksheet, but in an expression of any complexity presenting exported local names in this way makes the expression unreadable. I have been combing help looking for a clue as to how the results from the package can be pretty-printed without a fully-qualified name. Can you suggest how I should proceed.

My other question concerns the macro command which is used in the example code to format the pairs.  As written in the help file, the macro command is intended to replace the name _PAIR with a space.  However, it seems that the macro facility now replaces _PAIR with name quotes instead of a space. Has the macro facility changed since the example was written?

Does globalsolve from global optimization toolbox thread safe or not

for example,transform diff(u(x,y),x) with xi=xi(x,y) and eta=eta(x,y);

it should be

diff(u(x,y),x)=diff(u(xi,eta),xi)*diff(xi(x,y),x)+diff(u(xi,eta),eta)*diff(eta(x,y),x)

I want to do min max algebra in maple but dont know how to start. What package is required . Can anyone help me. 

I want to find coodinates of the point A, B, C, D and X of a problem 6 at IMO 2018 https://www.imo-official.org/problems.aspx

I tried 

 

restart:
 with(Student:-MultivariateCalculus):
 A := [0, 0]; 
B := [5, 0]; 
C := [3, 4]; 
DD := [a, 2]; 
solve([Distance(B, A)*Distance(C, DD) = Distance(B, C)*Distance(A, DD)], [a]);

How can I get coordinate X lies inside life request?

Hi,

I'm trying to implement Kernal PCA, I've got a large kernal matrix for which I have checked the elements are of floating point type, however when I try to run the Determinant operation on the matrix all of the coefficients say float(undefined).

In the same worksheet, there I have implemented the standard PCA routine, for which the determinant operation works fine. You can see this operation functioning corrrectly in it's testing section.

If anyone has any idea why this might be occuring I'd be really grateful for some advice.

Thanks

FUML.mw

 

Hello !

I want to plot its steamlines and Isotherms for different parameters. Anyone can help me for this issue.

eq1:=diff(f(eta),eta,eta,eta)+f(eta)*diff(f(eta),eta,eta)-(diff(f(eta),eta)^2)-M*diff(f(eta),eta)=0:
eq2:=(1+R)*1/Pr*diff(theta(eta),eta,eta)+f(eta)*diff(theta(eta),eta)=0:
bc:=D(f)(0)=1,(f)(0)=0,(D)(f)(N)=0,theta(0)=0,theta(N)=1:
Pr:=1:R:=0.5:M:=0.5:N:=10:


 

Hello World (again);

For your edification, look at  a file.

L

fine_semiprime_2.mw

For what it's worth

Regards,

Matt

 

Can anyone explain the reasoning that went into the programming decisions that led Maple to give these results?

restart:
is(-infinity, complex); #expected: false
                             false 
is(-infinity-I*infinity, complex); #expected: false
                              true
exp(-infinity - I) = limit(exp(x-I), x= -infinity); #expected: 0=0
                         infinity*I = 0
is(exp(x)<>0) assuming x::complex; #expected: true
                             false
is(exp(x)<>0) assuming x::real; #expected: true
                              true
coulditbe(exp(x)=0) assuming x::complex; #expected: false
                              true

 

I got my maplet and there error occurs when I try to display it - Error, (in Maplets:-Display) BoxCell contains an element (_Maplets_reference_1235) that cannot be placed in a layout.
Please correct Maplet definition.

How to fix it?

with(Maplets[Elements]);

mpt := Maplet(Window("Точка выше или ниже прямой", [[[ToggleButton[TB1]("Tt", 'group' = 'tb1')], [ToggleButton[TB2]("Tt", 'group' = 'tb1')]], ButtonGroup['tb1']()]));

Display(mpt);

Hi I want to generate dihedral group of order 8.I have given the commands
with (GroupTheory):

GroupTheory(DihedralGroup);

DihedralGroup(8, s);
                              D[8]
Elements(DihedralGroup(8, s));
{(), (12345678), (14725836), (16385274), (18765432), 

  (1357)(2468), (1753)(2864), (13)(48)(57), (15)(24)(68), 

  (17)(26)(35), (28)(37)(46), (12)(38)(47)(56), (14)(23)(58)(67), 

  (15)(26)(37)(48), (16)(25)(34)(78), (18)(27)(36)(45)}
but I need symmetric and rotation matrices like 

R0=[1,0;0 1],R1=[0,-1;1,0], R2=[-1,0;0,1], R3=[0 1;-1,0],S0=[1 0;0 -1], S1=[0 1 ;1 0], S2=[-1,0;0,1]; S3=[0,-1;-1,0]
 Can any one help me how to generate these matrices

I am trying to check to see if two equations are equivalent, subject to rearrangment and scalar multiplication. For example, I would to have a procedure that would determine that each of the following equations are the equivalent:

(a) (1/2)*y*exp(-y)+2*y^3 - x*ln(x) +x^2 = 10
(b) (1/2)*y*exp(-y)+2*y^3 +x^2 = 10 + x*ln(x)

(c) y*exp(-y)+4*y^3 - 2*x*ln(x) +2*x^2 = 20

Is there a systematic way to go about doing this? Thanks!

I have a vector v= [1 ,1,0]
M=[1 2 3; 5 4 3; 7 9 0];

c=v.M

whats wrong with this. error is in the last statement

First 632 633 634 635 636 637 638 Last Page 634 of 2431