Maple 17 Questions and Posts

These are Posts and Questions associated with the product, Maple 17

I want to know which other maple in-built function does the same thing as fsolve and LinearSolve. I can use both to solve systems of equations either by passing the equations directly to fsolve or deciding to generate matrix to be used in LinearSolve while still getting the same result. So, i'm using this medium to ask if there are/is other inbuilt function that does the same/similar thing as the two.

Hi MaplePrimers,

I'm trying to solve a system of algebraic equations using 'solve' [float].  I'd prefer to use 'solve' over 'fsolve', as 'solve' solves my system in about 0.05s, whereas fsolve takes about 5 seconds.  I need to solve the system repeatedly at a different points, so time is important.  I don't know why there is such a large difference in time ... 

I have a few piecewise functions of order 3 to 5.  It solves fine with the other (piecewise) equations, but adding one piecewise function which gives me an error while trying to solve:

Error, (in RootOf) _Z occurs but is not the dependent variable.

I think this is due to solve finding multiple solutions.  Is there a way to limit solve to only real solutions?

Thanks in advance!

Has anyone else seen the following behavior in Maple 16 and/or 17? In worksheet mode, with 2-D math notation, after hitting <enter> to execute a line several times, the software switches, without warning and unrepeatably, to a mode where only the arrows work -and that is to scroll the sheet. This means the <enter> command is no longer recognized.

My only solution has been to click on the line with the mouse, for which it returns to input mode. This behavior started in version 16 and I switched back to 15. However, I prefer features of 17 such as the different subscript options, that I would like to stay in 17.

I note this behavior occurs on both my Windows based machines and have seen it on students' Mac based machines. We use a common site licence at our institution and I wonder if that might be the problem.

In short - it is a pain.

(Yes, I did try to look for other posters with a similar problem, but failed. )

I have following expression:

y1:=t->1/(4*cosh(t)^2)

I:=int(y1(t)^2,t=-T/2..T/2)

Now I tried:

MultiSeries:-asympt(I,T,5)

for which I only get the highest order.

Can I increase the order in any way?

Hi to you,

Lets do this;

.1234567891*10^10 +.5 - 1234567892;
                                                   0.

the result is -0.5 and not 0.

I'm new in Maple ... can you help to understand the problem?

Thanks in advance.

Some three and a half years ago, after having upgraded from Maple 9.5 to Maple 11, I had to abandon the latter and return to the former, the problem being that the GUI did not allow me something as completely trivial as to go to the very end of a line by pressing END on my keyboard, see I declare defeat: rolling back to Maple 9.5.

With Microsoft phasing out updates for Windows XP as of April 2014, I decided to run Windows 7 instead of XP. According to MapleSoft, Maple 9.5 does not run under either 32 bit or 64 bit Windows 7, and thus I was forced to upgrade Maple.

Having installed Maple 17 an hour or so ago, I decided to open a Maple 9.5 document to see how it was rendered. To my complete surprise I found again that I was not able to move to the very end of a line using END on my keyboard. Can that really be true? This seems completely mad to me.

I have theoretically 3(could eventually be more) layers with an incident wave with a wave equation for that wave.

It refracts into the 2nd layer from the first and now has a 2nd wave equation, then from the 2nd into the 3rd layer with a 3rd wave equation.

All the wave equations are of the form, Psi(z) = A_1psi_1(z) + B_1psi_2(z); this is just a general solution where psi_1&2 are linearly independant solutions that make up the general equation above and A_1 and B_1 are constant coefficients that would be A_2,B_2 and A_3,B_3 for the 2nd and 3rd layers respectively.

Transfer matrix method gives A_1,B_1 in terms of A_2,B_2(as it transfers from layer 1 to 2 they equate under boundary conditions so you can solve the simultaneous equations for results). You create a matrix of these results and multiply it with the respective matrix of the 2nd layer to 3rd layer to give you the overall transfer matrix from one side of the system to the other.

I think something to do with transfer function but not sure how to use it or set up the problem. 

Thanks in advance for any pointers.

 

Hi, 

Apologies if this is a very simple question and I am being a bit stupid, but how do I plot two functions of r on one graph, if they operate over different values of r? 

Say I have the functions:

FOO = r→APOT*exp(-r/rho)-CPOT/r^6+4*E2/r 

g = r→(c1*exp(d1*r)+c2*exp(d2*r)+c3*exp(d3*r)+c4*exp(d4*r))/r 

where FOO takes values of r between 0.5 and 2, and g takes values of r between o.2 and 0.5. 

 

Any help would be appreicated!

Please help me, here my problem:

 

Parsing a string works correctely like this:

ABC := 3443;

print("ABC = ", eval(parse(cat("A", "B", "C"))));

                

 

But using PROCEDURE it doesn't work:

myParse := proc ()

     local PEA;
   

      PEA := 4334;

      print("PEA = ", eval(parse(cat("P", "E", "A"))))

end proc;

myParse();

                        "PEA = ", PEA

 

I suppose to have "PEA = ", 4334

Hi Everybody,

I'm having some problems simulating an algebraic system in Maple.  I want to do this for a larger system of equation (~20 equations/20 variables, with 3 inputs), but I'd like to get an idea of the form this should be in.

So, using an example out of Maple help:

with(DynamicSystems);

sys1:=AlgEquation([y=sin(x)],[x],[y],discrete=true,sampletime=0.001);

inp1:=Vector[column]([1,2,3,4,5,6,7]) * 0.1;

res:=Simulate(sys1,[inp1]);

Error, (in DynamicSystems:-Simulate) should never be here

 

I don't understand what this error means.  Reading the example in the help files, says the second argument should be a vector of input values.  What I would assume this would do is plugin x = 0.1, then solve y=sin(0.1), and output y.

Am I missing some syntax, or is my inputs wrong?  There are examples of how to set up an algebraic system in the help files, but no examples of how to simulate them.

 

Thanks in advance for any help!

 

 

 

 

Say I have the following loops:

for C from 1 to 10 do
    r:=[]:
    for K from 2 to 10 do
    r:=[op(r),2*K+2*C-3];
    end do:
    print(r);
end do:

for C from 1 to 10 do
    r:=[]:
    for K from 2 to 10 do
    r:=[op(r),K*C+K+C-2];
    end do:
    print(r);
end do:

I wonder how could I write a procedure, say use expressions "2*K+2*C-3" and "K*C+K+C-2" as input arguments?

so I can call up like :

 

myfun(K*C+K+C-2) or myfun("K*C+K+C-2")

myfun(2*K+2*C-3)

 

I dont care whether the output(s) are lists, tables, or matrices.

My main difficulty is to get the expression to be procedure inputs.

Though if the output can be a  10 by 9 matrix, it's better.

Thanks,

 

casper

 

 

we were given a function that counts the number of primes among the arguments after the
rst and returns the result in the rst argument. When calling this, you must make sure
that the rst argument is a name. 

this is it.

cp := proc (YY) local count, i ;
print("nargs=", nargs, "args=", args) ;
count := 0 ;
for i from 2 to nargs do
if isprime(args[i]) then
count := count+1 ;
end if ;
print("i=", i, "count=", count) ;
end do ;
print("count=", count) ;
YY := count ;
end proc ;

EX: cp('noprimes',2,4,5,6,7,9,19)

and this works grand, but then we were given this function with slight adjustments to it and asked to fix it. the hints we were given were to try and forve evaluation at the right places.

This is the function we have to fix...

xcp := proc (count) local i;
print("nargs=", nargs, "args=", args) ;
count := 0 ;
for i from 2 to nargs do
if isprime(args[i]) then
count := count+1 ;
end if ;
print("i=", i, "count=", count) ;
end do ;
print("count=", count) ;
end proc ;

 

any help is appreciated!

I want  to verify the following function expression

is indeed an antiderivative of the function expression

where  A>0 with B^2-4*A*C<0.

I have tried the command

>diff((2),x);simplify(%);

where (2) is the label of the antiderivative expression.  But the result is very awkarward and lengthy. How could I verify the antiderivative expression is indeed an antiderivative of the other function by using Maple 17? 

 

``

-(-2*N__1*`&omega;__2`*`&omega;__1`^2*lambda-8*N__2*lambda^3*`&omega;__2`-sqrt(4*N__1^2*lambda^2*`&omega;__1`^2*`&omega;__2`^2+16*N__1*N__2*lambda^4*`&omega;__2`^2+N__1*N__2*`&omega;__1`^2*`&omega;__2`^4+4*N__2^2*lambda^2*`&omega;__2`^4)*`&omega;__1`)/(4*N__1*lambda*`&omega;__1`^2*`&omega;__2`+16*N__2*lambda^3*`&omega;__2`)

-(-2*N__1*`&omega;__2`*`&omega;__1`^2*lambda-8*N__2*lambda^3*`&omega;__2`-(4*N__1^2*lambda^2*`&omega;__1`^2*`&omega;__2`^2+16*N__1*N__2*lambda^4*`&omega;__2`^2+N__1*N__2*`&omega;__1`^2*`&omega;__2`^4+4*N__2^2*lambda^2*`&omega;__2`^4)^(1/2)*`&omega;__1`)/(4*N__1*lambda*`&omega;__1`^2*`&omega;__2`+16*N__2*lambda^3*`&omega;__2`)

(1)

`assuming`([simplify(-(-2*N__1*`&omega;__2`*`&omega;__1`^2*lambda-8*N__2*lambda^3*`&omega;__2`-(4*N__1^2*lambda^2*`&omega;__1`^2*`&omega;__2`^2+16*N__1*N__2*lambda^4*`&omega;__2`^2+N__1*N__2*`&omega;__1`^2*`&omega;__2`^4+4*N__2^2*lambda^2*`&omega;__2`^4)^(1/2)*`&omega;__1`)/(4*N__1*lambda*`&omega;__1`^2*`&omega;__2`+16*N__2*lambda^3*`&omega;__2`), 'size')], [all, positive])

(1/4)*(4^(1/2)*((N__1*lambda^2+(1/4)*N__2*`&omega;__2`^2)*`&omega;__2`^2*(N__1*`&omega;__1`^2+4*N__2*lambda^2))^(1/2)*`&omega;__1`+2*lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2))/(lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2))

(2)

`assuming`([combine((1/4)*(4^(1/2)*((N__1*lambda^2+(1/4)*N__2*`&omega;__2`^2)*`&omega;__2`^2*(N__1*`&omega;__1`^2+4*N__2*lambda^2))^(1/2)*`&omega;__1`+2*lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2))/(lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2)), 'size')], [N__1 > 0, N__2 > 0, `&omega;__1` > 0, `&omega;__2` > 0, lambda > 0])

(1/4)*(`&omega;__1`*`&omega;__2`*((4*N__1*lambda^2+N__2*`&omega;__2`^2)*(N__1*`&omega;__1`^2+4*N__2*lambda^2))^(1/2)+2*lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2))/(lambda*`&omega;__2`*(N__1*`&omega;__1`^2+4*N__2*lambda^2))

(3)

 

``

``


Download question_13.12.06.mw

I have following expression

f:=t->((1/8)*s^2*sinh(4*t)+t+(1/2)*s^2*t+s*sinh(2*t))/(1+s*cosh(2*t))

which is 1 solution of the ODE

ode2 := -(diff(y(t), t, t))+(4-12/(1+s*cosh(2*t))+(8*(-s^2+1))/(1+s*cosh(2*t))^2)*y(t) = 0

Now I wanted to construct 2 linear independent solutions via:

f1:=f(t_b-t)

f2:=f(t-t_a)

and calculate the Wronskian:

with(LinearAlgebra); with(VectorCalculus)

Determinant(Wronskian([f(t_b-t), f(t-t_a)], t))

Since I know these functions are solutions of the second order ODE which does not contain any first order derivative the Wronskian should be a constant. Unfortunately Maple has a hard time to simplify it since the epxression is a little big. Is it my fault or has anyone an idea what to do?

First 42 43 44 45 46 47 48 Last Page 44 of 61