MaplePrimes Questions

Hello

I have such problem:

I calculated rather complicated function, and i want to obtain the array or list of data with definite step.

For this purpose I used next expression:

Out:=[seq(t,F(t),t=0..tmax,step]

I need minimum 1000 points, but calculation for the 100 points requires about 300 second, for 1000 - it will be about 3000 seconds. It's too long for me.

 

How could I accelerate this process?

 

P.S.

Plotting of my function requires about 90 seconds for the entire range. So, this is very strange, thad converting to data list requres so much time.

Is there any webpage like Wolfram Library Archive but with Maple related resources? I've missed something or everything goes to mapleprimes? 

I need to complete the definition of bcount so that bcount(n) returns the total number
of odd coefficients 
n
k , 0 ≤ k ≤ n. For instance, the values of 
n
k for n = 6, with odd values highlighted, are:
1, 6, 15, 20, 15, 6, 1,

bcount:=
proc(n::TYPE)
description "Count odd binomial coefficients.";
---MORE STUFF HERE---
end proc; # bcount

Any help appreciated

Hi everybody i've to minimize a function of about 5-6 variables so i tried some of maple functions like: 'Minimize', 'minimize', 'NLPSolve' but with 'minimize' my pc goes in loop and it eats a lot of ram without giving some results, while with the Optimization package i got the error :'

Error, (in Optimization:-NLPSolve) abs is not differentiable at non-real arguments

'

code :

 

restart;
L := 1:
b := 1.1:
p := 1.8:
xa := 0:
xd := -b/2:
ya := -p+z:
yd := 0:


quadrilatero := proc(q,xa,ya,xd,yd,l1,l2,l3,modo,alpha0,alpha1)
local xb,yb,l5,c,alpha,theta5,theta2,xc,yc,theta3,xm,ym:

xb := xa+l1*cos(q + alpha0 + pi/2):
yb := ya+l1*sin(q + alpha0 + pi/2):
l5 := sqrt((xd-xb)^2+(yd-yb)^2):
c := (l2^2+l5^2-l3^2)/(2*l2*l5):
if modo = 1 then alpha := arccos(c) else alpha := -arccos(c) end if:
theta5 := arctan(yd-yb,xd-xb):
theta2 := theta5 + alpha:
xc := xb + l2*cos(theta2 + pi):
yc := yb + l2*sin(theta2 + pi):
theta3 := arctan(yd-yc,xd-xc):
return (theta3 - pi - alpha1):
end proc:
#funione sterzo
f := proc(q,ya,l1,l2,l3,yd,alpha0,alpha1)
local theta;
theta := quadrilatero(q, 0, ya,-b/2,0, l1, l2, l3, -1,alpha0,alpha1) - pi/2;
if theta < Pi and Im(theta) = 0 then theta := theta + 2*pi end if;
return theta;
end proc:
#funzione desiderata
Yd(q) := arctan(tan(q),(1 - b*tan(q)/2/p));
arctan(tan(q), 1 - 0.3055555556 tan(q))

#Definisco procedura dei minimi quadrati:
n := 1: i := 0:
q := Vector[n]: rms := 0:
for i from 0 by 1 to (n-1) do
q[i] := Pi*(i/(4*n)):
rms := rms + abs(f(q[i],ya,l1,l2,l3,yd,alpha0,alpha1) - yd(q[i])^2):
end do:
rms := sqrt(rms / n):
#MIN := (minimize(rms, z = -0.4..0,alpha0 = 0..Pi/3,alpha1 = Pi/2..5*Pi/4,l1 = 0.3..1,l2 = 0.001..0.3,l3 = 0.01..0.3,iterationlimit = 100));
with(Optimization):
Optimization[NLPSolve](((rms)));
Error, (in Optimization:-NLPSolve) abs is not differentiable at non-real arguments

 

thanks in advance for your help !

 

How to realize the Cantor staircase function in Maple? Mathematica has it.

I'd like to stress the three desired properties:

(i) The virtual Cantor function can be evaluated to arbitrary numerical precision.

(ii) For certain arguments, this function automatically evaluates to exact values.

(iii) Mathematical function, suitable for both symbolic and numeric manipulation.

It is given 

   xn (n x - n - x) / (x-1)2 + x / (x-1)2  , n is a (symbolic) positive integer.

I want to transform it into

n xn+1 / (x-1) - x (xn-1) / (x-1)2

How is it possible?

I tried the  simplify, convert (parfrac), collect, combine, expand,  with/without assuming.

Thanks in advance.

Hi everybody,

Ever since i updated to maple 2015, the output of calculations display a disproportionate amount of zeros. For instance:

If i write:

2.3*10^(-4)

i get:

0.000230000000000

Is there anyway to make maple NOT display the last 10 zeros? I've tried Tools ->Options ->Precision -> Round screen display to X. But then it rounds all results to that X amount of digits, wich is also anoying. Like, if i set X to be 10, it'll write 3.000000000 instead of just 3.

Hope someone can help me :-)


Anton

 

Cn ={ 1, n = 0 ,                                                  }

      {Xn−1[sum of] k=0   C(k)C(n−1−k) , otherwise.  }

 

looking to complete the definition of catalan so that catalan(n) returns Cn whenever n is a non-negative integer. usin g the definition above...any help appreciated

 

catalan:=
proc(n::TYPE)
description "Print the n'th Catalan number.";
option remember;
---MORE STUFF HERE---
end proc; # catalan

I am working on something where I need to use a stack. In the Maple documentation I noticed there are two different stack implementations. There is "stack" and "SimpleStack". I am curious if anyone has any experience using either of these and if there is any advantage to one over the other. Any suggestions or tips are appreciated.

 

Thanks,

Steven

Hello everybody

In the attached file, as you can see, 'u' is function of 'thet1(t)' explicitly, But when I want to differentiate from 'u' w.r.t 'thet1(t)', maple returns zero as the answer. How is it possible?

Thanks in advance

d.mw

I have an ODE with L(x,y), which includes partial derivatives of L(x,y) and coefficients y,_y1 and _y1^2. I want to split this equation into seperate equations of these coefficients. So I can solve for the unknown variable L(x,y).

 

ODE:=diff(L(x,y),x,x)+2*_y1(x)*diff(L(x,y),x,y)+_y1(x)^2*diff(L(x,y),y,y)+y(x)/x*diff(L(x,y),x)+(y(x)*_y1(x)/x+_y1(x))*diff(L(x,y),y)-y(x)/x^2*L(x,y)=0;

Could someone help me? 

 

I am currently trying to use the coeffs command but not really getting anywhere.

 

Thank you.

I a working with circuits, and was wondering whether or not it might be possible to shorten the proces of calculating parallel resistors. My idea is that using some symbol, such as || would find the equivalent resistor.

My idea is based on the fact that CrossProduct can also be done using &x command. Like so.

CrossProduct(a,b) = a &x b

 

So for resistors it would look something like:

Parallel(a,b) = a || b

 

For those interested the function for parallel resistors would be:

Parallel := (a,b) -> 1/(1/a+1/b);

the binomial coefficient  n k  can be defined recursively as follows for all nonnegative integers n, k:

(n)  = {0,      k>0

(k)  = {1       k=0, k=n

         {(n-1)+(n-1), otherwise.

          (k-1)   (k)

I need to complete a deinition of binom so that m so that binom(n,k) returns  n k  for all n greater than 0, and k greater than or equal to 0 using the definition of the binomial above..Any help appreciated..

binom:=
proc(n::TYPE1,k::TYPE2)
description "Compute a binomial coefficient";
option remember;
---MORE STUFF HERE---
end proc; # binom

 

I can calculate the quotient and remainder (r1) of a polinom (p1) divided by another (p2).

Unfortunately, I can't figure out how to divide r1 with p2, so that I get negative powers as well.

For example:

p1 = x^2+3

p2 = x+2

(x^2+3):(x+2) = x, and the remainder is: (-2x+3)

-----------

(-2x+3):(x+2) = -2, and the remainder is: (-1)

-----------

(-1):(x+2) = -x^-1, and the remainder is: (2x^-1)

-----------

(2x^-1):(x+2) = 2x^-2

...

As a result I get:

p1/p2 = x + -2 - x^-1 + 2x^-2 and so on...

How can I achieve this?

 

How does one explain this? 

restart;

A := Matrix( 3, 3, [ 1, 1, 1, 1, 0, 0, 1, -1, 1 ] );
LinearAlgebra[ConditionNumber]( A );
linalg[cond]( A );

A := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = -1, (3, 3) = 1})

 

6

 

6

 

B := evalf( A );
LinearAlgebra[ConditionNumber]( B );
linalg[cond]( B );

B := Matrix(3, 3, {(1, 1) = 1., (1, 2) = 1., (1, 3) = 1., (2, 1) = 1., (2, 2) = 0., (2, 3) = 0., (3, 1) = 1., (3, 2) = -1., (3, 3) = 1.})

 

3.000000000

 

6.000000000

 


Is this not a valid way for creating a floating-point matrix?
Otherwise, how do I explain the wrong result here?

-- Regards,

Franky

 

First 1187 1188 1189 1190 1191 1192 1193 Last Page 1189 of 2428