C_R

2597 Reputation

19 Badges

5 years, 20 days

MaplePrimes Activity


These are questions asked by C_R

I was wondering if Maple could be setup in a way that no parallel processing is performed (as on a single core)?

I know, it's a poor way to test an algorithim/method for thread safety (i.e. deterministic behaviour). But it is better than nothing.

Are there other ways to test for thread safety?

expr:=cos(x)^2;
expr=combine[trig](expr);
(x->x=combine[trig])(expr);

Update:
Same outcome with

expr=`combine/trig`(expr);
(x->x=`combine/trig`)(expr);
                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

                           2               
                     cos(x)  = combine/trig

When executing the attached work sheet, the output

changes to

Why is that (local seetings maybe?) and how to reproduce the former, more compact output?

Copy-pasted from the wonderful:

Advanced Engineering Mathematics

Dr. Robert J. Lopez

Emeritus Professor of Mathematics

Maple Fellow

© Maplesoft, a division of Waterloo Maple Inc., 2023

This is obtained in Maple by writing the differential equation

 

q := diff(x(t),t) = k*(40 - 16/18*x(t))*(8 - 2/18*x(t));

diff(x(t), t) = k*(40-(8/9)*x(t))*(8-(1/9)*x(t))

(1)

 

and solving via the syntax

 

X := simplify(rhs(dsolve({q,x(0)=0},x(t))));

(-360+360*exp((8/3)*t*k))/(8*exp((8/3)*t*k)-5)

(2)

 

The differential equation is actually separable, and can be solved with the techniques of elementary calculus discussed in Section 3.1.

 

If an observation provides the data that at time t = 1 there were 6 grams of water, then the constant of proportionality k can be computed.  In Maple, the data point gives the equation

 

eq := eval(X, t=1) = 6;

(-360+360*exp((8/3)*k))/(8*exp((8/3)*k)-5) = 6

(3)

 

whose solution is

 

K := solve(eq,k);

(3/8)*ln(55/52)

(4)
 

 

Download Output_formated_with_rational_factor_.mw

On the corresponding Modelica page I find

Since MapleSim 2024 now has been upgraded to Modelica 4.0 (which I appreciate very much by the way - Thank you), I was wondering if I could give this libraray a try?

I am looking for simple ways to set up digital controllers in the context of developement of code for micro-controllers. From the github page:

Furthermore, in sublibrary Controller about 20 input/output blocks of linear systems are provided that are based on the different representation forms, e.g., PID, StateSpace, Filter blocks. A unique feature of these blocks is that it is very convenient to quickly switch between a continuous and a discrete block representation. Also, templates are provide to quickly built-up standard controller structures. 

I was about to convert -1 to exp(I*Pi).

First try by intuition

convert(-1, exp);
                               -1

False intuition. Next try by right click on -1 and consulting the context pannel: -> nothing that rings a bell

Entering a complex number 0.5000000001 + 0.8660254037*I to see if that changes something

-> something but no exponential form
                          

Next: AI assitant

->   OK, I know this. -> refine query

Polar, of course!

convert(-1, polar);
                          polar(1, Pi)

Not what I want. Maybe

convert(convert(-1, polar), exp);
                               -1

Next -> Ask for help in MaplePrimes whether there is a command

4 5 6 7 8 9 10 Last Page 6 of 33