Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Solve the equation y"-4y=lnx ?

                                     

Hello!

if anyone can help ill be greatful!.

i have his equation:

eq1:=(8/x)=tan(7*x/50)

of course  there are infinite analitical solutions....   solution = F(x)+Pi*n, n=1....infinity

what i want to do, is to define N. and then,  to put the first N solutions of the equation into a Vector called X,

so X[1]=F(x)+1*Pi

X[2]=F(x)+2*Pi

...

X[N]=F(x)+N*Pi

can someone help?

When exporting plots some labels are occasionally cropped. This is true when exporting via the context menu or with plotsetup('gif', etc.) for instance (plotsetup also drops the third label in 3D plots, the context menu keeps it).

I discovered that scaling the plot from the context menu can help: is there a programmatic way to control the plot scale?

From the context menu: Manipulator -> Scale, the plot can be rescaled to ensure that all...

Hello,

i want to solve the following for q[b], theta is a symbolic coefficient. When I use the solve command it produces a RootOf that i cannot handle by using either allvalues or evalf. I can't use fsolve since there is theta 

In the previous question, we discussed a workaround for evaluating a multi-variable integration. 

For the following example 

> g := (e1, e2, e3) -> piecewise(e1+1.200000000 <= e2 and e3-2.400000000 <= e1, evalf(64.00000000*exp((-1)*8.000000000*e1^2)*exp((-1)*8.000000000*e2^2)*exp((-1)*8.000000000*e3^2)/Pi^2), 0);
>
> evalf(Int((x, y, z) -> g(x, y, z), [-2 .. 2, -2 .. 2, -2 .. 2]), 3);
Maple could start execution and do the computation.

Someone asked me the other week whether a color gradient could be easily applied to a high density point-plot, either vertically or horizontally graded.

Without thinking, I said, "Sure, easy." But when I got to a computer, and gave it a little thought, I realized that it's not that easy to do it efficiently. And it really ought to be, even for tens of thousands of points.

There is a help-page plot,color which briefly describes some things that can be done with coloring plots. As of Maple 16, it mentions a "color data structure" which can be created by calls to the new ColorTools package. There is an example on that page for a single color, but not for several colors concurrently. Using Colortools to get a list of colors, for many points, can be done. (And there ought to be such an example.) But for the case of many data points that uses quite a lot of memory, and is slow.

Also, there is no 2D plotting equivalent to the 3D plotting colorfunc functionality. There ought to be. And just as the 3D colorfunc should be fixed to take three arguments (x,y, & z) any new 2D colorfunc should be made to take two arguments (x & y).

So, how can we apply a color gradient on a 25000 2D-point-plot, shaded by y-value? One way is to notice that the various 2D and 3D plot data structures can now store an efficient m-by-3 (or m-by-n-by-3) C_order, float[8] Array for the purpose of representing the chosen colors. (That is not documented, but can be learned by observation and inspection of various example plot structures.) We know that such an Array is relatively memory-light, and can be produced very quickly.

What this task has become is a 2D version of this method of inserting a custom made color sequence into a 3D plot, but more efficient on account of using a float[8] Array.

To get some decent timings the attached worksheet uses the time[real] command. Timings are computed both immediately after computation (same execution block) as well as after plot rendering (next execution block).

It takes about 1 sec for the Maple 16.01 64bit Standard GUI on Windows 7 to throw up and render the plot, for both methods.

It takes 3.4 sec, and a 108 MB increase in allocated memory, to compute the plot data structure result using ColorTools and a list. But it takes only 0.45 sec, and a 20.5 MB increase in allocated memory, to compute an equivalent plot data structure using the float[8] Array. (Timings on an Intel i7-960.)

[worksheet upload is misbehaving. So inlining the code.]

restart:
N:=25000:

xy:=LinearAlgebra:-RandomMatrix(N,2,generator=0.0..1.0,
                                outputoptions=[datatype=float[8]]):

str:=time[real]():

plots:-pointplot(xy,
                    color=[seq(ColorTools:-Color([xy[i,2],0,0]),i=1..N)],
                    symbolsize=4);

time[real]()-str;

                             3.323

time[real]()-str; # in new execution group

                             4.400
kernelopts(bytesalloc);

                           107646976


restart:
N:=25000:

xy:=LinearAlgebra:-RandomMatrix(N,2,generator=0.0..1.0,
                                outputoptions=[datatype=float[8]]):

str:=time[real]():

p:=plots:-pointplot(xy,color=red,symbolsize=4):

c:=Array(1..N*3,(i)->`if`(irem(i,3)=1,xy[(i+2)/3,2],0),
         datatype=float[8],order=C_order):

subsindets(p,specfunc(anything,COLOUR),z->'COLOUR'('RGB',c));

time[real]()-str;

                             0.483

time[real]()-str; # in new execution group

                             1.357
kernelopts(bytesalloc);

                            20545536

When an integration is successfully evaluated numerically, a float number is returned, otherwise the unevaluated expression is returned. I'm wondering whether Maple has a utility function which simply takes in whatever the integration evaluation gives and return a boolean flag indicating whether it is unevaluated or is a floating point result? 

Hi, I got a problem that "Warning, solutions may have been lost" when I solve 

eqns := {a+r*t*ln(l)+(1-l)^2*m-b-r*t*ln(s)-(1-s)^2*n = 0, a+r*t*ln(1-l)+l^2*m-b-r*t*ln(1-s)-s^2*n = 0}
vars := {l, s}
solve(eqns, vars)
Why?

hi

i write the followinf code in maple

eq1:= f'''(x) - f'(x)

is this posible in maple that i worte the above command like this

Linear:= d3/d(x) - d/d(x)

eq1:= linear (f)

thanks for youe attention in advance

hi

i have 2 equation named eq1 and eq2 with 2 unknown parameter a and b which each equation dependent to a and b. i want to achieve critical a and b to minimize eq1 and eq2.

previously i have eq1 and one parameter a only and i use the NLPSOLVE command. but , for above mention problem i dont know how achieve a and b?

 

thancks for your attenrion in advance

Question is very simple:

if I write square root as  f^(1/2) , then the compile function gives a error: 

Error, (in Print) rational numbers and arithmetic are not yet supported

if I write it as sqrt(f) then compile works.

But Maple seems to internally always convert sqrt(f) to f^(1/2). So, I am constantly getting the above error!

Is there a workaround? I have an impression of very poorly written Compile function....

any software help to see the Maple code inside the library with extension .lib?

So I have this array of plots with log vertical axes. I generate it with a seq(logplot(.....)) construct and then display the whole sequence. Works like a charm...except all plots have linear scale! So I try plot(...,axis[2]=[mode=log]): works fine for direct plot but not in display. I try to add the log axis to display, like display(...axis[2]=[mode=log]): same result, linear axes.

Is plots:-display unable to produce a log plot? I can obviously plot the log(data),...

acer discussed in a recent post the effect of different array types on performance.

I have, however, a much more elementary question: Maple has a bewildering number of differing data structures: Arrays, Vectors, lists, sets, tables,... Some of these are supersets of others.

Being still on the learning curve I am building a module with definitions of certain functions or procedures I use frequently, such as to make my life easier. A lot of my stuff uses array-like...

Hi, I have a set of data (see here:I-V_data.xls), voltage and current, which is measured from Keithley semiconductor analyzer, I want to load into Maple(version 15) and using formula as follow Two diode equationto fitting the curve, where I (i.e. current) appear at both right-hand-side and left-hand-side, V (i.e. voltage...

First 1569 1570 1571 1572 1573 1574 1575 Last Page 1571 of 2224