MaplePrimes Questions

Dear Fellows, greetings

I am solving a system of equations under some assumptions and those assupmtions are a must to impose. However maple fails to apply those while solving the equations. For example solution 4 gives b=c as a solution but in assumtion it is clrealy mentioned that b<>c. Kindly guide me what mistake am I making in the code.

System_problem.mw

Background

This 'quirk' of Maple behaviour cropped up when I was considering solutions for the question posted here

https://www.mapleprimes.com/questions/232433-Extract-From-Record

where the OP had "poorly structured" data which meant it was a bit "awkward" to access required fields. A number of more-or-less satisfactory solution were proposed, and the OP seems happy

 

The Issue

One possible way to solve the original problem would be to restructure the data as a DataFrame. The "natural" way to do this would be to use numeric row indexes.. Note that these row indexes are not contiguous, and are in no particular order. However using this approach means that accessing fields from the dataframe is not consistent.

Sometimes the supplied row label is interpreted as a 'label', sometimes it is interpreted as the "row number". It appears that the latter interpretation is preferentially used

I can't make up my mind whether to call this a "bug" or not, but I can see the inconsistent interpretation resulting in chaos.

Before submitting an SCR I'd like to know if anyone else sees this as a bug

Consider the code

  restart;
  prettyprint=1:
#
# data
#
  S := [`206` = Record(mu = 508.001018040,  sigma = 125.002863204708),
          `4` = Record(mu = 1008.001018040, sigma = 167.707232430134),
          `2` = Record(mu = 1208.001018040, sigma = 141.512246146314),
          `5` = Record(mu = 808.001018040,  sigma = 117.156800098735)
       ]:
#
# Construct the above as a dataframe - note row labels are numbers!
#
  DF:= DataFrame( Matrix([seq( [rhs(j):-mu, rhs(j):-sigma], j in S)]),
                  rows= [seq( parse( lhs(j) ), j in S)],
                  columns=[mu, sigma]
              );
  DF[206, mu];
  DF[2, mu];  ## Errr No!
  DF[5, sigma];
               [           mu             sigma      ]
               [                                     ]
               [206  508.001018040   125.002863204708]
               [                                     ]
         DF := [ 4   1008.001018040  167.707232430134]
               [                                     ]
               [ 2   1208.001018040  141.512246146314]
               [                                     ]
               [ 5   808.001018040   117.156800098735]

                         508.001018040

                         1008.001018040

                        117.156800098735

Note that DF[2, mu] outputs the entry from the second row - not the one from the row labelled with the number 2

I imagina a similar issue would occur with numeric column indexes, although I haven't tried this
     

 

 

Hi

I have a list of records :

S := [`206` = Record(mu = 508.001018040, sigma = 125.002863204708), `4` = Record(mu = 1008.001018040, sigma = 167.707232430134), `2` = Record(mu = 1208.001018040, sigma = 141.512246146314), `5` = Record(mu = 808.001018040, sigma = 117.156800098735)]

How can I extract from S the mu and sd corresponding to a number.

eg input 2 get 1208.001018040,141.512246146314

like this:  rhs(S[3]):-mu, rhs(S[3]):-sigma, (I know from inpection 2 occurs in the 3rd slot but assume i don't know where it occurs). I tried using Search...
 

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?

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

 

 

 

First 277 278 279 280 281 282 283 Last Page 279 of 2308