Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Suppose we have an unknown parametric function like g(x). We do not know the exact form but we know that g(x) is increasing and concave. Also, we define h(x) = g(x)*f(x) where we know the exact form of f(x) like f(x)=2x+5. Here, I want to investigate if the function h(x) is concave or not. How is it possible to do this?

 

Thanks

In this worksheet the solve command almost immediately gives up and DirectSearch[SolveEquations] is erratic.

For some triangle/inellipse points of tangency the latter provides a nonsense answer and for others it produces an almost correct solution.

Is there a set of conditions which determine the possibility of an inellipse within a triangle?

Inellipse.mw

A responder will have to establish a connection to the DirectSearch package.

Hi, 

Here is my first attempt to work with Embedded Components.
I loaded the "Bezier curve" example ("how to drag points") and the "Linear Regression" one ("how to add points") from the MathApps, merge the codes and modified them in order to draw a polygon with an arbitrary number of sides.

After many unsuccessful attempts I begin to understand the mogic behind Embedded Components (I'm familiar with Maplets and I'm sure this didn't help me).
For now , I am able to define points, drag them, and erase everything. A small step for Mankind but a huge step for me.

What I would like to do now is to erase some points.
The basic code is 

# Plot1 is the PlotComponent
# The list of the points is pt
#
# x0 and y0 are the co-ordinates of the point to remove from pt
# _removing is the number of the point in pt closest to (x0, y0)
#
# Update is the procedure which does the plot in Plot1

Remove := proc()
     x0 := DO(%Plot1( "clickx" ) );
     y0 := DO(%Plot1( "clicky" ) );
     d := map(n -> add((pt[n]-~[x0, y0])^~2), [$1..nops(pt)]):
     _removing := sort(d, output=permutation)[1];
     subsop(_removing=NULL, pt);
     Update();
end proc;

Unfortunately I don't understand well enough the logic of  Embedded Components to make this work

Can you help me fix this?
TIA

sketch.mw

PS: In procedure Update I define two plots named fond (=background) and grille (=grid): grille is a workaround to "toggle gridlines" or 'gridlines'=true for none of these options work for me (Maple 2015.2, Mac OSX Mojave)

Hi,

I have have been trying to creat a slider and use the value as a "variable" to vary the sin function..

I tried many things and can't seem to get iit to work...any suggestions woul be appreciated..I am still brand new to Maple

I have searched Application center..and spend hours trying to get this right...I am attacing my worksheet

Thanks for your help!

Frank

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/CreatingSlider.mw .
 

Download CreatingSlider.mw

Just in case the worksheet won't work I am attaching a jpeg

To my knowledge, I think it should return 'true'. But in this case and many other similar cases, it returns 'false'. Sometimes after rebooting my laptop it gives 'true'. This made me crazy. Please help!

X

Y

z

19.8

12

1.62

24.7

14

1.2

26

16

1.25

35.1

20

0.84

37.8

20.83

0.74

10.8

9

3.98

16.1

12

2.46

38.3

18

0.52

24.5

16

1.42

15.8

11

2.35

28.2

17.8

1.19

56.8

27

0.37

25.4

17

1.34

29.3

18.1

1.12

 

How to plot the (x,y,z) points on 3d plot like first point is (19.8,12,1.62) like that in order

and connect all the ponts above as a line

 

Kind help your help will be acknowleged

IN FIBONACCI RABBIT PROBLEM, SUPPOSE ONLY 3/4 (PROPORTION) OF FEMALES BECOME PREGNANT THEN HOW TO DETERMINE THE ANNUAL RATE OF INCREASE IN RABBITS?

Some misguided individuals insist that perpetual motion machines are impossible. Here is a proof that they are wrong!

One of these units hooked up to an electrical generator should be enough to supply all your household electrical needs as well as charge your Tesla in the garage.

If you build one and find out that it doesn't work as demonstrated here, then surely you must have misread the specs. Try it again and again until you succeed.

Download perpetual-motion-machine-corrected.mw

restart:
with(plots):
kernelopts(version);
 

How do I setup solve to find only the real and imaginary part of Zeta to be both positive and the real part of Zeta to be the smallest positive value? For example: real part = 1.348412872 and imaginary part = 0.04230725448.

Acceleration ratio (db) and phase (deg). Convert ratio to linear and phase to radian. 
dat := <14.52407334|-162.1310124>:
A := 10^(dat[1]/20.):
phi := dat[2]*Pi/180.:
R:= 0.3036:
Characteristic equation Eqn 5
f := (Zeta,A,phi) -> cos(Zeta) - R * Zeta * sin(Zeta) - exp(-phi * I)/A:

soln := [solve(f(Zeta,A,phi), Zeta)]:
 

Tests.mw

Hi MaplePrimes team,

 

I am aware that Maple is not designed for CAD and I am not here for you to help me build any advanced system like the example below.

 

Figure 1: Trimmed surface of fuselage to create airplane windows.

 

Here I my problem. Even using the adaptmesh option, creating serious trimmed surfaces requires large numbers of grids like for example [3000, 3000] and even beyond, which makes a mesh unnecessary on most of the surface and especially where we don’t need high resolution.

While if we limit the display volume with the Maple’s view command (view = [x1..x2, y1..y2, z1..z2]), the edges are always smooth regardless of the coordinates system or the type of mesh of the surface to be treated.

 

And so, the reason I’m writing this message is to ask you why creating trimmed surface with plot3d surface wouldn’t use Maple view’s algorithm to get smooth edges?

 

Future Alternative Solution:

I also take this opportunity to ask you when would it be possible to update the Maple’s grid option such that the point space will variable in term of surface variable. For example:

plot3d(<x(s,t), y(s,t), z(s,t)>, s = s1..s2, t = t1..t2, grid = [m(s,t), n(s,t)] )

 

I am sure that this solution, which for me does not seem to be difficult to implement, could be an alternative to enrich the mesh where we really need it and therefore a better control. What do you think?

 

Thank you in advance.

 

Best.

 

Guy.

Hello everybody – It looks like there is a bug in the numerical evaluation of (multiple) Zeta function. Take for instance, Zeta(3, 0.5) which is approximately 8.4144. Maple gives approximaterly -96.0033. Is there a bug somewhere?

Thank you

Textbook gives this nice short implicit solution for this ode

As

But Maple does not give an implicit solution

restart;
ode:=diff(y(x),x) = 2*(2*y(x)-x)/(x+y(x));
ic:=y(0)=2;
sol:=dsolve([ode,ic],'implicit')

Removing implicit gives very complicated solution as it tries to solve for y(x).

book_sol:=(x-y(x))^2-1/2*(y(x)-2*x)^3=0;
odetest(book_sol,[ode,ic])

Any suggestion or a trick or a different approach to make Maple generate the same solution given in the textbook?

ps. manually, it is possible to obtain the same solution as book as follows

restart;
ode:=diff(y(x),x) = 2*(2*y(x)-x)/(x+y(x));
ic:=y(0)=2;
sol:=dsolve(ode,'implicit');
sol:=simplify(exp(lhs(sol))=exp(rhs(sol)));
the_constant:=solve(sol,_C1);
the_constant:=eval(the_constant,[y(x)=2,x=0]);
sol:=eval(sol,_C1=the_constant);
odetest((lhs-rhs)(sol)=0,[ode,ic])

 

edit june 14,2021

I found a direct way to get an implicit solution which is close enough to book solution. It is by using Lie symmetry method

restart;
ode:=diff(y(x),x) = 2*(2*y(x)-x)/(x+y(x));
ic:=y(0)=2;
sol:=dsolve([ode,ic], y(x),'implicit','Lie');

Another variant which gives book solution but requires one extra step

restart;
ode:=diff(y(x),x) = 2*(2*y(x)-x)/(x+y(x));
ic:=y(0)=2;
sol:=dsolve([ode,ic], y(x),'implicit','Lie',way=all,fat);
simplify(exp( (lhs-rhs)(sol)))=1

ps. corrected above now, thanks to comment below by Carl.

Maple 2021.1

 

 

 

In the context of analyzing physical systems I often have to plot results in the form of y=f(x,a,b,c,…). Here the plot variables x and y are physical quantities and the system parameters a,b,c… can have units as well.

After substitution of parameters the expression f(x,a,b,c,…) can be plotted using plot(f(x,a,b,c,…),x_range). Unit choice and labeling of the abscissa work already well when x_range is given in the format x=x0..x1 (where x0 and x1 have a value and a unit). This is already a huge improvement since labeling and unit conversion errors on the abscissa are almost impossible.

Also, the units on the ordinate are correctly displayed. However, if the depended variable y is desired to be displayed on the ordinate it must be added by hand using the label option. In doing so the display units and labels of both axes must be re-entered by hand. This re-entering step is a source of labeling and conversion errors.

To improve ordinate labeling and to reduce conversion errors I would love to see two improvements:

  • A plot option that would allow unit conversion of plot axes. I.e. telling Maple in which units a physical quantity has to be displayed and forcing a rescaling of the values of the physical quantities.
  • With less priority and additional to expressions, the plot command should also accept equations in the form of y=f(x) as input. This would lead to a very compact syntax that produces content rich and, more importantly, correct plots of physical quantities. Wrong labeling and conversion errors would be very unlikely.

Overall, I am very pleased by Maples unit functionality. I have been reluctant to switch from my old work style of using names as unit placeholder and self-made conversion sets. But now I feel that the likelihood of producing unit conversion errors with my old work style has become higher than using Maples units.

I can only encourage interested users to give units a try. Its good!  For me it has turned out to be time worth invested.

I also hope that Maplesoft continues their efforts of providing more unit functionalities. It’s a big task but calculations with physical quantities are also a big differentiator.  

Hi, I need to count elements in an indexed set. The below commands gives 3, as it doesn't take the powers into consideration (u[1,2,2]^3). Desired output is 5, meaning to count 1 three times.
       

with(ListTools):
>C:=x*u[]*u[1,2,2]^3*u[1,1,2];
>indx_set:=(`[]`@ op)~(indets(C, indexed));
indx_set := {[], [1, 1, 2], [1, 2, 2]}
>indx_set:=Flatten(convert(indx_set,list));
 indx_set := [1, 1, 2, 1, 2, 2]
>indx1:=[SearchAll(1,indx_set)];
[1, 2, 4]
>num:=nops(indx1);
3

Thanks

Hello there, 

Would you allow me to ask this one question?

What is the difference between 'map' and '~(element-wise operation)'?

The following worksheet snipped shows an example:



Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Q20210612.mw .
 

I thought that both operations were the same, but seemingly they are not. 

Best Regards, 

In Kwon Park 

Download Q20210612.mw

First 391 392 393 394 395 396 397 Last Page 393 of 2216