MaplePrimes Questions

Expressions of the kind

A cos(phi) - B sin(phi)

are solved by Maple to phi=arctan(A/B)

In such cases: Is there a way to get a solution phi=arctan(A,B) other than in the attached?

If not: Can the attached solution be done more efficient? There are quite some commands involved.

(It may happen that Maple returns "minus arctan". Then the attached solution does not work and has to be preplaced by something more complicated. A solution that always work would be desireable)

MB_exports_Schatz_Mechanism.mw

 

I'm new to Maple Flow.  As an exercise I'm replicating a calculation I did in Mathcad, building a blade element model of a hovering helicopter.  The physics is well documented, but any specific design changes the results. 

The lift and drag values of the airfoil of choice and the blade physical geometry are used to solve for the forces generated at any radial segment, these are integrated along the blade radius to compute the rotor thrust and torque.  These integrals are taking an inordinate amount of time--one blade angle setting took fifteen minutes to compute rotor thrust and torque.  Since the next step is to compute these values over a range of blade angles this poses a significant problem.

I'd post the file if I could figure out how!!

I'm trying to move to Maple Flow after a long time using Mathcad.  (Long enough that I remember when Maple was the symbolic engine in Mathcad.)  So I'm looking for the user's forum (like the old collaboratory), and I thought that MaplePrimes might be that resource.  Under the heading of "Products" I find a list of many different programs--every version of Maple and MapleSim--but Maple Flow is not to be found.

I decided to ask why, only to discover that it magically appears when the question window asks me to "categorize your question" to get it answered faster.  So I guess my question really is, "How do I find information  and questions specific to Maple Flow?"

hello 

i have 3 Arrays and i want to plot them i 2D, 

for example : 

y  := [1,2,3,4,5,6]

x1:= [10,20,30,40,50,60] 

x2:= [0.1,0.2,0.3,0.4,0.5,0.6]

and i want to display at the graph for each y point the value of x1 and x2 by two axis (dualaxis)

any suggestions ? 

 

thank u in advance !

I tried different things but can't figure how to make Maple give a simplified result from int command without these RootOf with sums in them. Here is an example.

restart;
anti:=int(1/(a+x^(1/5)),x);

The strange thing is that doing

eval(anti,a=1)

Keeps these rootsOf and Sums there. But doing

anti:=int(1/(1+x^(1/5)),x);

Gives simplified result without RootOf

I tried DEtools:-remove_RootOf and assumptions and value() but nothing worked. I tried assumptions on a, such as assuming a::integer,a>0 and other things. 

I need similar result as Mathematica:

ClearAll[x, a];
Integrate[1/(a + x^(1/5)), x]

I am sure there is an option in Maple to do that, i.e. give result without these RootOf and Sums. But so far, I could not find it. I looked at options to int() command also. 

Any one know what option to use or how to simplifies it the the above result by Mathematica? 

Maple 2022.1 on windows 10

Is there a way, or a way to get maple to implement, the ability to animate multiple parameters? Basically duplicate all the prameters features(such as the ability to set them to loop, speed, etc).

E.g., suppose I have space curve and I want to rotate in 3 dimensions using a rotation matrix and animate the rotation for visualization purposes. I can animate one rotation angle but not more than one. When clicking on the plot the properties bar adds a slider and other properties I can play with but I can only do it for one angle at a time. It would be nice if I could do it for more than one.

It would be simple, say, as being able to set an array for the parameters, e.g., a=[0..1, 0..Pi, 0..2] and then use a[1], a[2], a[3] for the parameters.

How to make maple 12 to use Intel SGX 1 or SGX 2 to run code secretly? If maple 12 can not, which version of maple can use SGX 1 or SGX 2?

Hi there!

I have developed a component in Modelica to import values from a Matlab struct into MapleSim and use it with other components. This data is saved in a ".mat" file and the struct was constructed as follows:

% Matlab command window
% Struct name is "bemData" saved in a v7 format to be read in by Modelica
>> bemData.m33 = 100;
>> bemData.Ainf33 = 100;
>> bemData.Khs33 = 20000;
>> bemData.ss_rad33.A = [1 1;0 1];
>> bemData.ss_rad33.B = [1;0];
>> bemData.ss_rad33.C = [1 1];
>> bemData.ss_rad33.D = 0;
>> save -v7 bemData.mat

And the Modelica code I am using to try import this into MapleSim is as follows:

Modelica.SIunits.Mass M = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.m33",1,1));

Modelica.SIunits.Mass Ainf = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.Ainf33",1,1));

Modelica.SIunits.TranslationalSpringConstant C = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.Khs33",1,1));
    
Real A[2,2] = Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.A",2,2);

Real B[1,2] = transpose(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.B",2,1));

Real C[1,2] = Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.C",1,2);

Real D = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.D",1,1));

I then use these imported variables to solve ODEs, and the result is incorrect. I have narrowed it down to the fact that MapleSim/Modelica imports a value of 0 in place of the original data in the struct. Moreover, there is no way to attach a probe to any of the imported variables in MapleSim (I need to force all model variables to be displayed in the Simulation results tab).

I would appreciate help in pointing out where I might be making a mistake. My primary concern is why a value of 0 is being imported in place of the actual Matlab struct data. When I use Matlab's command window to check the contents of the struct, they appear to be in order.

Also, I have saved the struct file in the same folder in which my custom component is stored (the Modelica file where I have written the code to import the data). Should I be saving this file elsewhere?

Thank you!

Is it considered OK to give singular solution to an ode which does not satisfy the ode?

I thought may be because it is singular solution and not general solution, then that is allowed sometimes. But it seems strange to me to give a solution which cleary do not satisfy the ode, even if it is singular.  But may be because it is singular, it is not required to satisfy the ode? Here is an example

restart;
ode_1:=diff(y(x),x)=sqrt(1+x+y(x)) ;
sol_1:=DEtools:-dalembertsol(ode_1);

Gives

But the first given "solution" (singular) does not satisfy the ode. Plugging it into the ode gives  -1=1.  Also odetest(y(x)=-x,ode_1) agrees it does not satisfy the ode. It gives -2 and not zero.

What do others think about this?  

Given a set (list) of PDE, is there a way to search all possible solution sets? For instance, pdsolve will output the solution

{_eta[0](t, x) = 0, _xi[t](t, x, u) = _C1, _xi[x](t, x, u) = _C2, eta[1](t, x) = 0}

for the list of PDEs below. But I am aware that there is another solution different from the above, is there way to seek these other solutions?

 

[alpha*u^2*(diff(eta[1](t, x), t))+alpha*u*(diff(_eta[0](t, x), t))-u*(diff(eta[1](t, x), t))-u*(diff(eta[1](t, x), x))+u*(diff(eta[1](t, x), x, x, t))-(diff(_eta[0](t, x), x))-(diff(_eta[0](t, x), t))+diff(_eta[0](t, x), x, x, t), -(diff(_xi[x](t, x, u), u, u, u)), -(diff(_xi[t](t, x, u), x))-(diff(_xi[t](t, x, u), t)), -(diff(_xi[t](t, x, u), x, x)), -2*(diff(_xi[t](t, x, u), x, x))-(diff(_xi[x](t, x, u), x, x))+2*(diff(eta[1](t, x), x)), diff(eta[1](t, x), t)-2*(diff(_xi[x](t, x, u), x, x)), -(diff(_xi[x](t, x, u), t))*alpha*u-(diff(_xi[x](t, x, u), x, x, x))-(diff(_xi[t](t, x, u), x))+2*(diff(eta[1](t, x), x, t)), -(diff(_xi[x](t, x, u), x)), -(diff(_xi[t](t, x, u), t))*alpha*u+(diff(_xi[t](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), t))*alpha*u+eta[1](t, x)*alpha*u+alpha*_eta[0](t, x)+diff(_xi[t](t, x, u), t)-(diff(_xi[t](t, x, u), x, x, x))-(diff(_xi[x](t, x, u), x))-(diff(_xi[x](t, x, u), t))+diff(eta[1](t, x), x, x), -2*(diff(_xi[x](t, x, u), u)), -2*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[t](t, x, u), u))-(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -5*(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -2*(diff(_xi[t](t, x, u), u, u))-(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u, u)), -3*(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u, u)), (diff(_xi[t](t, x, u), u))*alpha*u-(diff(_xi[x](t, x, u), u))-3*(diff(_xi[t](t, x, u), x, x, u)), -2*(diff(_xi[x](t, x, u), x, u))-4*(diff(_xi[t](t, x, u), x, u)), -(diff(_xi[t](t, x, u), u))*alpha*u+(diff(_xi[x](t, x, u), u))*alpha*u+diff(_xi[t](t, x, u), u)-(diff(_xi[x](t, x, u), u)), -3*(diff(_xi[x](t, x, u), x, x, u))-(diff(_xi[t](t, x, u), u)), -7*(diff(_xi[x](t, x, u), x, u)), -3*(diff(_xi[x](t, x, u), x, u, u))]

This works

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
DEtools:-abelsol(ode);

But this does not

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
name_of_solver:=abelsol;
DEtools:-name_of_solver(ode);

Then I found this made it work

eval(DEtools:-name_of_solver)(ode);

So I am guessing what happens is this: doing DEtools:-name_of_solver Maple first searched for a proc called name_of_solver inside DEtools package, and found none. So it does not work.

But adding eval first, then name_of_solver is evaluated and replaced by abelsol and after that the call is made, and it then finds this proc inside the DEtools package.

But my question is, why is eval needed here?

Is it not automatically happens that a variable is replaced by its value? So I expected DEtools:-name_of_solver to automatically become DEtools:-abelsol and only then the call is made.

Why the rule of evaluation is different in this case?

Formatting_exponents_in_typesetting_situations.mw
How do I format express an exponent in standard notation when typesetting a caption?  10^2 displays as 100 when I want it to display as 10^2 but without the caret.

restart

with(plots)

logplot(10^x, x = 0 .. 8, size = [300, 300], legend = [y(x) = 10^x], legendstyle = [location = top], caption = typeset("How do I type,", 10^8, ", and have it show up as 10^8 in the caption?"))

 

NULL

Download Formatting_exponents_in_typesetting_situations.mw

Any one knows of a way to have Maple verify that this solution of the ODE is correct?

restart;
ode:=diff(y(x),x)=x*(y(x)^2-1)^(2/3);
sol:=dsolve(ode);
odetest(sol,ode);

gives

-4*x*y(x)^2*hypergeom([3/2, 5/3], [5/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*hypergeom([1/2, 2/3], [3/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*(-signum(y(x)^2 - 1))^(1/3)

Tried different simplications, but can't get zero.

For reference, this is Mathematica's solution and it verifies it:

Using Maple 2022.1 on windows 10.

with(GroupTheory):

st := time();
RightCosets(SymmetricGroup(10), SymmetricGroup(11));
time() - st;

0.047

Note GroupOrder(SymmetricGroup(11)) is 39916800. It is a very large group. This seems unimaginable to me. Can I know how maple does it?

How do I access numerical formatting from command line?

The help page shows you how to use the point and click menus to change the numerical formatting. It works fine but I want a command to convert from say decimal to scientific notation. Am I missing something?

Here the gui menu on the right hand side of a typical worksheet.

This is the help page for "Numerical Formatting" but there is not much about commands, just the point and click menus. If anyone knows where to search for these commands, please respond. Thanks.

https://maplesoft.com/support/help/maple/view.aspx?path=worksheet/expressions/numericformatting

First 8 9 10 11 12 13 14 Last Page 10 of 2143