Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Another feature added to Maple 15 partially in response to the MaplePrimes forums is the new/improved ?HTTP package.  It provides one-step commands for fetching data from the web: much simpler than using the ?Sockets package directly. In most cases, the command ?HTTP,Get is what you would use:

 (s, page, h) := HTTP:-Get("http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors"):

The above fetches the HTML source of a page from Wikipedia and stores it as a string 'page'. The other two outputs are 's', and integer HTTP status code and 'h' a table of the headers returned in the HTTP response from the server.  Compare this to the amount of code needed to fetch data in my Baby Names application for Maple 12, for example.

Hi Maple experts,

is there a way to tell Maple, that it only gives me the first 10 solutions it finds.

My problem is, that I have an equation

eq := f(x,a,b)=0

with probably millions of solution pairs

(a_0 , b_0).

I use

solve(eq, {a,b} )

Therefore, maple thinks the whole night, fills 2Gb of memory untill I have to interruped the calculation.

 

Indeed I need only 1 nontrivial solution (a,b)  !

I was wondering whether The Mathematics Survival Kit is now also available for Mac? When I downloaded it for version 14 it was a windows version which I was unable to use because I'm a Mac user... ;-( So I am concerned that when I buy it now for Maple 15 I might get another useless version...

There have been some recent posts about interpolating data.

Attached below is a worksheet that shows some possibilities, with the functionality centering on the CurveFitting:-ArrayInterpolation command.

This is quick summary of parts of a broader document which covers both 2-d and 3-d methods (for regular grids), where I've left out the higher-efficiency methods and instead roughed in some examples involving integration and differentiation.

I've elected not to follow the 3-d Example from the ArrayInterpolation command's help-page, although using a pre-formed grid is a very fast approach to obtain just an interpolated 3-d plot. I also prefer to use the plots:-surfdata command rather than the plots:-matrixplot command, since the former let's one get the axes' tickmarks correct for the x- and y-data ranges.

The scenario is that you have a grid of data points in two dimensions (x- and y, or P- and T-, or what have you).

For each point (ie, for each 2-d pair of values) you have an associated value (or height in z, say). Hence you actually have data points in 3-d space.

How you obtained the associated (z) values depends on your own particular data collection method, or your own program. How you got the data is irrelevant here. What matters is that you have the finite number of data values, and no other easy way to generate data values at more points (let alone data for arbitrary new points). Below, we'll just create the data (once, at the start) for this example using an entirely made-up formula.

The presumption is that you might wish to plot a smooth surface that connects the 3-d data.

But you might also wish to write some program which requires interpolated (z) values at some new (x,y) 2-d points.  And you do not yet know what these 2-d point pairs are. So a pre-formed Array of points  at which to interpolate may not suffice.

Instead of using a pre-formed Array of output points, we'll contruct a procedure named `B` which can be supplied with a new (x,y) 2-d output point and (if that point lies within the original range) return an interpolated (z) value.

This procedure `B` can also be plotted, using the usual `plot3d` comamnd. It won't plot quite as fast as would a pre-computed and pre-interpolated finer grid of (x,y) values, but it should plot nicely. And the surface can be made quite smooth, by merely increasing the number of plotted points using plot3d's usual numpoints option. (Maple does not currently do "adaptive" 3-d plotting, so there's also no advantage in that respect.) But `B` does solve the secondary task, of being able to compute for any subsequent (x,y) point.

We can even integrate and differentiate `B` numerically. Of course we should keep in mind that this is somewhat error prone, since on top of usual issues with numerical differentiation there is also fact that we make the choice of interpolation method! The entire interpolated surface will differ considerably according to whether a spline, cubic (or other) interpolating scheme is chosen!

We'll use P and T as the x- and y- grid points, below, since "a name is just a name" and our choice of variables is arbitarary.

plot_interp.mw

I am new to Maple and I have not been able to figure out how to do something that should be very simple.

Using Maple to derive the conditions of a problem, I arrive at the following equation:

3*a(-1/3*b/a)^2+2*b(-1/3*b/a)+c = 0

By hand, I can simplify this equation, but I cannot figure out how to Maple to duplicate my result.

What steps do I need to go through to get the equation in the simplified form:

1/3*(3*a*c-b^2)/a = 0

Thanks.

Hi

 

I have a problem with an assigment for a Marine Construction claass:

Solving the non-dimensional vibration equation numerically (Eq. 2.1). To this end, implement the following transformation:

Z = dX/dT

Eq 2.1: diff(X(T), T, T)+a*(diff(X(T), T))+b*X(T) = C*(1-(diff(X(T), T)))*abs(1-(diff(X(T), T)))*sin(W*T)

 

I've tried to do the following:

 

> dsolve(diff(X(T), T, T)+a*(diff(X(T), T...

Hi

I'm trying to debug my module, but cannot find the problem! The problem areas are marked with red. Can you help?

Modul.mw

 

I want to do numerical differentiation and integration on a large data set.

How can I do?

I'm trying to plot some expressions the contain infinite summations.  On some of them it is working, but is really slow, and on others Maple keeps thinking and consuming more memory until it reaches just under 2 gb, by which time it is pretty much hung.

Is there a way make Maple not work so hard in evaluating the summations?

It looks like for me using shift+tab does not work in linux when one selects 1D as the default input notation and is typing in a worksheet. 

Does anyone know where we should submit bug reports for things like this?


thanks.

Hi,

I'm trying to solve a nonlinear diff. equation numerically using (dsolve) but it gives me an

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging
my code is:
ode:= diff(f(x),x,x,x)+f(x)*diff(f(x),x,x)+B(1-(diff(f(x),x))^2=0   # f'''+f*f''+B(1-(f')2)=0
bcs:= f(0)=0,diff(f(x),x)(0)=0,diff(f(x),x)(5)=1                            # f(0)=0, f'(0)=0,f'(5)=1

Patch request - Patch work on bugs for Maple ceases when a new version of Maple nears release, possibly months before the actual release.  I think it's safe to say no work will ever be done to patch up older versions.  But how can we, the user, introduce our own fix code into maple?  Because we can't fix the built in code how can we temporarily or permanantly make our own patches?

For example prior to Maple 14 a bug exists in a ' for - in ' loop. ...

I have been watching a demonstration on youtube about LP and Interior Point Methods:

http://www.youtube.com/watch?v=MsgpSl5JRbI

He is solving a LP by using a barrier function and has a very nice simulation
in the end where the solution converges to he optimal point and mu goes to zero.
I tried to replicate it in Maple but I am strugeling.
I have attached an worksheet what I have done so far:

Hi,

I'm using solve and I want all the solutions within a certain value, but then within my procedure i'm looking to get a list of just the solutions by using the AllSolutions=true command I get:

a:=evalf(solve([sin(x) = 0.5, 0 < x, x < 10], x, AllSolutions=true,Explicit=true));
 {x = 0.5235987758}, {x = 6.806784084}, {x = 2.617993879}, {x = 8.901179187}

I then need to put them into a list [0.5235987758, 6.806784084,...]

so i either...

25_04_2011.zip

From the work of the Russian MAC.
3.000 visitors a day, about 20.000 visits per day

http://webmath.exponenta.ru/

 

First 1702 1703 1704 1705 1706 1707 1708 Last Page 1704 of 2224