MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Suppose I have, say three arrays. I want to perform division on all the same positional elements of the array one and two, and raise the result to a power of designated by the same positional element of the third array.  In other words, the function applies to each of the elements of the array separately.  How do I do that without getting into programming?  Ratch


I ran into problems while trying to write the input to NLPSolve in the Matrix Form because the problem dimensions depend on the input data. Take the following example:

max f(x)           <- f a nonlinear function of x

st: x1+x2+x3+x4                     ≤ b

I've written a procedure which currently outputs, for example, 3/8*2^(1/3)*k^(4/3). However when I plot this it doesn't give me the correct graph that I'm looking for. I've found that rewriting the equation as  3/8*2^(1/3)*(k^2)^2/3 will give me the proper function in Maple, however I don't know how to get my procedure to output the equation in terms of k^2. I'm sure there's a fairly straightforward solution- does anyone know what I'm missing?


I'm taking a calculus of variations class and checking some answers with Maples VariationalCalculus package and the EulerLagrange command in particular.

I've done an exercise by hand for which I don't get the same results from Maple and I'm trying to see why.

Can anyone help me construct the EL equation "manually", in partcular how do I get the partial derivartive of an expression containing x, y(x) and diff(y(x),x) with respect to diff(y(x),x) ? That...

Has anyone successfully integrated a 3D plot from Maple (X3D?) into PowerPoint that can be manipulated within a presentation?  I have read an article on Tecplot's (another graphics software package) web site that explains how to export a Tecplot file as an X3D file and then embedding the X3D file into PowerPoint using a X3D plug-in.  See below:


The X3D plot can...



I'm using Maple versions 9.5 and 14.


I have a quite complicated functtion defined by means of a piecewise statement. Translation of that function into C code is required, so I tried to use CodeGeneration[C] and codegen[prep2trans]. The help of Maple version 9.5 tells me that the prep2trans command isneccessary to get the job done. It's about converting the MAPLE piecewise instruction into a  if ... then ... else if ......

Hi, I am new to using maple. For one of my classes we have been asked to find the root of a function using the bisection method. The function I am trying to find the root for is x-2^(-x) for 0<=x<=1. This is the sequence of commands that I am using

 f:= x-> x-2^(-x);

a:=0; b:=1;

 while b-a> 0.00001 do

      m:= (a+b)/2:

      if f(a...

How can I call a procedure value from inside a string?



I would like to build a piecewise function automatically.

I would like something like this but with 33 pieces:

> piecewise(0<=t and t<1, f[1](t)[i][j], 1<=t and t<2, f[2](t-1)[i][j], 2<=t and t<3, f[3](t-2)[i][j], ...,0);

I tried to use the seq command, and it worked with the condition argument of piecewise.:

> seq(1-q<=t and t<q,q=1..3);
          -t <=...

I get the following error message when trying to use LinearSolve(with inplace option) to solve a linear system of size 2000x2000 with 416 digits.


maple: fatal error, lost connection to kernel


Any suggestion to the cause of this error or how to avoid it?

Dear All,

I would like to make assumptuions about the input parameters of a procedure. The input parameter of the procedure should be the (1,1) element of a 2-dimensional Matrix. I make the same assumptions for the elements of the Matrix as expected by the procedure. When I  call he procedure with the (1,1) element of the matrix, it gives the following error. How should I use the assumptions or how to pass correctly the parameter to the procedure in this particular case?


I want to plot a function with a restricted domain, specifically f(x) = |x| if -Pi <= x < Pi.

I want to first define the function, then use it in the plot command.

I know to define the function f(x) = |x|, I do

f := x -> |x|

...but how do I tell Maple to include the domain, -Pi <= x < Pi?

Thank you.



I would like to differentiate a sinlge-variable function containing abs(), min(), and max() calls. For smaller functions it seems to work, however for my procedure, it does not seem to work. What can be the problem? I would appreciate any comment. 


It seems to work for the followings:

> diff(min(5*x,3),x);
                     /        ...


It is not corect in my problem to get different parameters a, b, c, ... for fmin, fmax and the objective function.

The probleme is to minimize the objective function (fmax-fmin)/fmoy.

NLPSolve((fmax-fmin)/fmoy,t = 0 .. Pi/p/wr,a=1..5,b=0.1..0.5,c=0.4..0.8,d=10..20,wr=200..300,p=5..20);...

First 789 790 791 792 793 794 795 Last Page 791 of 1263