MaplePrimes Questions

How to solve with numeric pdsolve?

first domain: from 0 to x1 (for example: from 0 to 0.2), thermal diffusivity, a1=1*10^(-6), lambda1=3
second domain: from x1 to x2 (for example: from 0.2 to 0.3), thermal diffusivity, a2=5*10^(-7),lambda2=1
IC:=T(x,0)=298 for both domain,
BC1:=T(0,t)=1200;
BC2:=T(x1+x2,t)=D[1](T)(x1+x2,t)=-10*(T(x1+x2), t)-298)/lambda2),

Regards
wzel

Hi, everyone.

I have got a question. There are n variables q[1],q[2],...q[n]. Each variable can take the value of 1,2, or 3, and I want get all the possible values of sum of these n variables,i.e. sum(q[i]...i=1..n). 
When n=2, I  write the procedure as follows:
    for q[1] from 1 to 3 do
      for q[2] from 1 to  3   do

Hi,

I have this procedure:

f := proc(x) if x < 0 then x^2+1; else cos(x); end if; end proc:

When I calculate NLPSolve(f,-Pi..2*Pi); the result is good. In NLPSolve, f(Pi) or f(-Pi) are also calculated.

When I want to determine f(Pi), I have this error code:

Error, (in f) cannot determine if this expression is true or false: Pi < 0

Why ? 

I must change my procedure with adding "evalf" to get a result for f(Pi):...

Hi all,

I'm having a problem with CodeGeneration[C].

In my simple example that reproduces the problem, there's a procedure containing just a single rtable statement. The contents of the rtable are 6 formulae depending on a single variable, p.

When I stuff the procedure xpr_3 into CodeGeneration[C], strange things will happen. It appears to me that CodeGeneration[C] is omitting anything with the variable p in it. However xpr_3 can be evaluated the usual way.

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

Hello,

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?

Cheers.

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:

http://www.tecplot.com/Training/PlotTips/AddingPizzazztoPresentations.aspx

 

The X3D plot can...

Hi,

 

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?

Hi,

 

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?

First 1982 1983 1984 1985 1986 1987 1988 Last Page 1984 of 2456