MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hello,

I have equation, which includes square roots. e.g.:

I know, that sqrt() will only return positive value, therefore when I put some values of a,b and c:

I get only one answer:

3.000000000

 

My question is how to calculate that second branch of the solution without altering eq. itself? (In my case this equation is derived from somewhere else and it cannot be modified)

 

 

 

Hi,

When I run a maple program which take a long time (in command line), I have this kind of message every second:

"memory used=43867.3MB, alloc=147.3MB, time=856.28"

Does there exist any way to avoid this display ?

Thanks in advance.

Hi,

I'm having trouble of converting my y-axis to decibel.  Here is is my script:

 

restart;
with(plots);
loglogplot(1/(1+f), f = 10^(-4) .. 10^4);

 

Everything is fine except for the y-axis, which is not in dB.

 

I'm computing a matrix which is a hessian of a quadratic function and it should be symmetric.

Unfortunately, because of the numerical errors, the hessian matrix becomes unsymmetric. 

Then, I want to use this matrix as the input for the QPSolve procedure, and I get the error that the matrix is unsymmetric.  

To obtain the symmetric matrix, I'm doing the following redundant computation:

A := MTM[triu](B, 1) + Transpose(MTM[triu](B)):

Is there a better solution to this problem?

Hi everyone, I have been trying to plot the Taylor Polynomial approximation with the following code. However, my maple crushes everytime I run it. I indexed some of the variables to get the plot. The code works fine without the index. What did I do wrong?

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 0;

X := 1; 

f := (x, t) -> 1/(3*x(t)-t-2); 

one := 1/(3*x(t)-t-2);

two := diff(f(x, t), t);

first := diff(x(t), t)

 

for k to n do

y[1] := subs(t = T(k), x(T(k)) = X(k), one);

y[2] := subs(first = y[1], t = T, x(T(k)) = X(k), two);

X[k+1] := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T[k+1] := T+h

end do;

X[n];

data := [seq([T[n], X[n]], n = 0 .. 30)];

p[2] := plot(data, style = point, color = blue);

p[3] := plot(data, style = line, color = blue);
display(p[2],  p[3])


 

The code without Index (which works fine)

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 1;

X := .1547196278;

f := (x, t) -> 1/(3*x(t)-t-2); 

one := x(t)^4*e^t-(1/3)*x(t);

two := diff(f(x, t), t);

first := diff(x(t), t);

for k to n do

y[1] := subs(t = T, x(T) = X, one);

y[2] := subs(first = y[1], t = T, x(T) = X, two);

X := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T := T+h

end do

Today I have a problem with assign that never arised before. I solved a system of equations with two solutions and wanted to assign, e.g. the second one. Does anybody know why "assign" here does not work, even though I often used it before in the same way. (I also tried it with the array-solution, but I received the same problem.

Output:

 

  {rH = 0., rL = 0., xH = 0.2289428485, xL = 0.2289428485}, {

    rH = 22.70954353, rL = 32.28670872, xH = 0.4250775404,

    xL = 0.4393791233}
  {rH = 0., rL = 0., xH = 0.2289428485, xL = 0.2289428485}, {

    rH = 22.70954353, rL = 32.28670872, xH = 0.4250775404,

    xL = 0.4393791233}
assign {rH = 22.70954353, rL = 32.28670872, xH = 0.4250775404,

  xL = 0.4393791233}
                         rL, rH, xL, xH


I would be very glad, if anybody could help me.

And here is the whole algorithm:

 

 

 

 

Hi,I'm using Maple 15. When I plot with the command

Aplot:= Plot2D(Q[2 .. 26, 13], Q[2 .. 26, 14], style = point, color = blue, symbol = solidcircle, symbolsize = 16, font = [Arial, Bold, 13], axes = box, axis = [thickness = 1, tickmarks = [5, subticks = 5]]);

There is the report of problem

Error, (in plot/options2d) unexpected axis suboption: thickness = 1

Thank you for helping me.

 

I have been having problems with using the BodePlot function with units:

 

R1 := 18.2*10^3*Unit('Omega');

R2 := 10^3*Unit('Omega');

C1 := 470*10^(-12)*Unit('F');

C2 := 4.7*10^(-9)*Unit('F');

# wo is in hertz

wo := 1/sqrt(R1*R2*C1*C2);

# Q is unitless

Q := wo*R1*R2*C2/(R1+R2)

 

with(DynamicSystems);

sys := TransferFunction(wo^2/(s^2+wo*s/Q+wo^2));

 

This is the error message I got:

Error, (in Units:-Standard:-+) the units `1` and `Hz` have incompatible dimensions

 

I think the problem is that the BodePlot function doesn't expect 'wo' to have units.  

So I tried to work around the issue by using the loglogplot but it doesn't seem to like 

complex function even when I used abs to find the magnitude (with or without units).

 

 Any workaround is appreciated.

I'm using MAPLE files, and a little to bored to run all commands in it.

Instead of it would be a bit easier to make a package.

Is there any post here how can I do it?

how to derive poincare series from symmetric function in maple

use taylor function need to specify its limit

if we do not know its limit, 

how to know whether a function is finite in taylor expression

for example poincare series

1/((1+x)*(1+x^2))

how to display as taylor series without specify the limit of degree

because do not want to approximate poincare series with taylor 

want a complete taylor series

goal is to find the polynomials which degree are 1 and 2 in above example

Strings := {"buffalo", "zebra", "aardvark", "aardwolf", "anteater", "antelope", "bumblebee"};
{"buffalo", "zebra", "aardvark", "aardwolf", "anteater",

"antelope", "bumblebee"}
CP := {seq(seq(StringTools:-Take(x, StringTools:-CommonPrefix(x, y)), x in Strings), y in Strings)};
P := table(map(proc (x) options operator, arrow; x = "" end proc, Strings));
for x in CP do for y in `minus`(CP, {x}) do if `and`(StringTools*IsPrefix(y, x), `implies`(assigned(P[x]), StringTools*IsPrefix(P[x], y))) then P[x] := y end if end do end do;
Error, cannot determine if this expression is true or false: StringTools*IsPrefix("a", "")

 

Hi I tried to apply these command in maple to see hoe cluster graphic after that can work .. but i face this problem ,

 

I am a begginer in maple working on it for a term paper to demonstrate it is ability to view the cluster analysis .

 

if u have any benefcial resources I ll be so happy.

 

thanks very much

How would one in Maple solve this, which is an inequality equation in some variables, which can be nonlinear, with constraints on range of each variable. I.e. I want to find conditions on the variables to make the inequality satisfied.

In Mathematica, I use the Reduce command

Clear[x, y];
eq = 1/2 - x + x^2 - y + y^2;
Reduce[{eq > 0, 0 < x < 1 && 0 < y < 1}, {x, y}, Reals]

How would one do the same in Maple? I tried solve, but can't give constraints.

restart;
eq:=1/2 -x+x^2-y+y^2:
solve(eq>0 , {x1, x2});

So I need to do the same as in the Mathematica command, but in Maple. I do not want numerical solution, but algebraic as shown above.

Using Maple 18.2 on windows.

x_1 = 1;

x_n = 1/2 (x_n-1 + 3/x_n-1 ) for n>=2

Is there a maple command to check if the above statement is rational, eventhough it is obvious enough?

I tried to evaluate x_2 using subs(n=2, x_n) but keep getting an expression in terms of x_1. Using evalf(x_2), the result was x_2.

I'm very new to maple, so please help :(

Hello people in mapleprimes,

I want to ask a question about modification of expression.

Basically, what I want to do is to change the expression of sqrt((-a)^2) to sqrt(a^2).

 

The expression I want to modify is this:

 

aa:=phi[n, j] = a[j, D]-a-sqrt((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j])

 

I want to change this to 

 

phi[n, j] = a[j, D]-a-sqrt((a[j, D]-a-tau[n, j])^2+4*gamma*f[c, n, j]/L[j])

 

To do this, I wrote as 

subs(sqrt((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j]) = sqrt((a[j, D]-a-tau[n, j])^2+4*gamma*f[c, n, j]/L[j]), phi[n, j] = a[j, D]-a-((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j])^(1/2))

 

Or, I wrote as 

subs(op([2,3,2,1,1],aa)=(a[j, D]-a-tau[n, j])^2,aa)

 

If there is better ways, please tell me them.

 

Best wishes.

 

taro

 

4 5 6 7 8 9 10 Last Page 6 of 1093