Maple 2015 Questions and Posts

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

Dear friend,

Recently I noticed, that numerical integration returns different values for the same function.

For example the code

restart;
evalf(int((exp(x)*(4420*cos(4)*sin(4)-544*cos(4)^2+148147*exp(-1)-4225*cos(4)-215203)/(71825*exp(1)-71825*exp(-1))-exp(-x)*(4420*cos(4)*sin(4)-544*cos(4)^2+148147*exp(1)-4225*cos(4)-215203)/(71825*exp(1)-71825*exp(-1))+(32/4225)*cos(4*x)^2+(1/71825)*(4225+(2210*x-6630)*sin(4*x))*cos(4*x)+x^2+8434/4225)^2, x = 0 .. 1));

each time returns values

0.0005951015934
0.0005950850548
0.0005950974588
0.0005950960805
0.0005951297843 etc.

Maybe, evalf uses a stochastic algorithm for integration?

Hi!

I have a problem recently with running RootFinding:-Isolate inside a procedure which is run on threads. I have many polynomial systems to treat so I would like to balance computations between cores. Unfortunately, my code always breaks computation kernel with the error:

java.lang.NullPointerException

at com.maplesoft.mathdoc.model.WmiModelLock.acquireLock(Unknown Source)
at com.maplesoft.mathdoc.model.WmiModelLock.writeLock(Unknown Source)
at com.maplesoft.worksheet.connection.WmiOutputUpdateBuffer$UpdateSynchronizer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

 

I wrote a small example below

f:=proc(n)

   local i;

   for i from 1 to n do
    try

      RootFinding:-Isolate([a^2+b^2-1/3c^2,a^2-1/3b^2+c^2-1/3,a^2-1/3b^2-1/3c^2+1],[a,b,c]):

   catch "":
     next:
   end try:
  end do:
end proc:

Threads:-Task:-Start ( null, Task[f,10000], Task[f,10000], Task[f,10000]);

 

I have no much of experiences with threads in Maple so I would not be surprise if I'm trying to do something completely wrong here. Any hint or advice will be appreciate. 

I'm trying to solve a system of equations thats expressed as a summation (the original has the summation symbol as opposed to 'sum'):

d_actual := solve(W_actual = sum(W_guess(def-asp_rad_inverse[i], E, asp_rad[i]), i = 1 .. n), def);

When n<5, I get an answer after a few seconds, but when n is higher, the program sits and 'evaluates' forever...I've waited up to 30 min. 

Background:

I have a plate with a number of hemispheres on the surface (# of impacted hemispheres given a force = n). Each has a unique radius and they're listed from largest to smallest in 'asp_rad[]'. I have an equation for the deflection of a single hemisphere as a function of Force and material properties that I have rearranged with respect to Force (W_guess(deflection, E, r)). There's an opposing plate that stays parallel to the original plate while pushing down on the asperities with Force W_actual. The total deflection of the opposing plate is the sum of: 1) the difference between the tallest radius and the impacted radius in question (asp_rad_inverse[]), and 2) the deflection of the impacted radius in question. 

I'm attempting to solve for the total deflection of the opposing plate via solving for the 'def' in the summation above, but when I run it, the program is not able to compute a solution.

Thanks in advance.

Hello!

 

If I type this into a CAS calculator from Texas, I get the right result for Uc wich is 545.2.

solve(Uc&angle;-90=400&angle;X-150&angle;0+j*174.4,Uc,X)

This is used in AC circuits.

However, in Maple I'm using polar coordinates, so Im using this preamble:

phasor := proc (r, theta) options operator, arrow; r*cos(convert(theta*degrees, radians))+I*r*sin(convert(theta*degrees, radians)) end proc

This basically means that I can write phasor(value,angle in degrees) and get the lenth and angle of a vector on the complex plane.

Basically I want to know how I can make Maple solve this:

evalf(solve({phasor(U__C, -90) = phasor(400, X)-phasor(150, 0)+phasor(174.4, 90)}, {Uc, X})) Where I'm just interested in U_C , X doesn't matter.

I can't figure out how to do this with my current preamble. Does anyone know how to make this work?

 

I once opened Tools-Tutors-Precalculus-Polynomials. Now every time I click the button of 'execute the entire worksheet', the same Tutor  window will pop up before Maple executes my codes. I wanna know how to prevent the window to pop up? 

Hello!

I'd like to define a function after loading the Units package. But when using the defined function, Maple displays "Units:Standard-" everywhere. Even in labels of plots. I'd like to avoid that. A sample file is attached. Is there a better way of doing it?

Thanks.

 

Bruno

Test.mw

Hi, I'm new to Maple and I have to produce a recursive procedure with the nomenclature Puis:=proc(X,n::integer) which calculates X^n with:

for n<0   ->   1/(X^(-n))

for n=0  ->   1

for n being an even integer   ->   X^(n/2) * X^(n/2)

for n being an odd integer   ->   X*X^(n-1)

The procedure I produced is:

Puis:=proc(X,n::integer)
option remember;
if n<0 then Puis(X,-n);
elif n=0 then 1;
elif rem(n,2,x)=0 then Puis(X,n);
else X*Puis(X,n-1);
end if;
end proc;

 

i don't have any eror up to this point, but when I try to evaluate, only Puis(4,0) works

Puis(4,-1);
Error, (in content) too many levels of recursion
Puis(4,0);
                               1
Puis(4,3);
Error, (in content) too many levels of recursion
Puis(4,4);
Error, (in content) too many levels of recursion

 

I was wondering what was wrong with my procedure, I changed the 1/(X^(-n)) with X^n and X^(n/2)*X^(n/2) for X^n because it is equivalent. I think I should put some sort of initial value to limit the recursion, but with that kind of function i really don't know how. I also tried with the X^(n/2)*X^(n/2) for the even numbers, but it says Puis expects its 2nd argument, n, to be of type integer, but received 1/2.

 

 

restart

int(sin(x), x)

-cos(x)

(1)

int(x^2, x)

x^2*_X

(2)

``

 

Download 12.mw

Hello All,

 

I am doing research for my master's thesis and I am trying to type a PDE into maple and have been struggling for about 2 weeks now. I am new to Maple but have had a lot of Matlab experience. I've seen a couple of ways to do variable changes and things but I'm still.

 

These are the substitutions I'm trying to do.

into this equation, but and some of these terms are 0 (x*d/dt are 0, P, and M_e, and q_ye).

 So it is basically a Euler-Bernoulli beam with a free vibration.

I tried to use dchange to do the substitutions but I am having trouble defining ...

 or doing both

 

 

 I see why there is an error but I don't know how to fix it.

 

I've also tried

Which is close but still doesn't look quite right. because d/dt(omega*t/2) -> omega/2

 

Any thoughts?

 

Thanks in advance

hi,

here a comlicated formula,how i simplify

thanks  a lot.

``

f := (kappa*omega^2+omega^3)*(Y+(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(kappa*omega^2+omega^3)))^2/(2*omega)+(-kappa*omega^2+omega^3)*(X+(sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(-kappa*omega^2+omega^3)))^2/(2*omega)+(Omega*N*cos(theta[2])*omega+Omega*N*cos(theta[1])*omega-P__X^2*kappa+P__X^2*omega+P__Y^2*kappa+P__Y^2*omega)/(2*omega)-(sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(8*omega*(-kappa*omega^2+omega^3))-(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(8*omega*(kappa*omega^2+omega^3))

(1/2)*(kappa*omega^2+omega^3)*(Y+(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*kappa*omega^2+2*omega^3))^2/omega+(1/2)*(-kappa*omega^2+omega^3)*(X+(N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(-2*kappa*omega^2+2*omega^3))^2/omega+(1/2)*(Omega*N*cos(theta[2])*omega+Omega*N*cos(theta[1])*omega-P__X^2*kappa+P__X^2*omega+P__Y^2*kappa+P__Y^2*omega)/omega-(1/8)*(N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(omega*(-kappa*omega^2+omega^3))-(1/8)*(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(omega*(kappa*omega^2+omega^3))

(1)

``

(1/2)*(kappa*omega^2+omega^3)*(Y+(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*kappa*omega^2+2*omega^3))^2/omega

(2)

``

    f is a complicated function,i want to make it more simplify,but i want to keep square style,

 let coefficients of X and Y keep one unit,and simplify terms  containd special symbol of omega

 

Download Q1119.mw

it what i wanted.

The Maple 2015.2 update is now available for Windows and Linux users. It provides official support for Windows 10, connectivity to the latest MATLAB release, support for MapleSim 2015.2, updates to Physics, and a variety of small improvements throughout the product.  It is available through the Check for Updates system, and is also available from our website on the Maple 2015.2 download page.

The Mac update will be released as soon as we have finished fixing the problems on Mac OS X 10.11. We’re working on it.

eithne

Hi,

    i meet  a partial differential equation seems not complicated

with(PDEtools):

PDE := (diff(f(x__1, x__2, p__1, p__2), x__1))*p__1/m-(diff(f(x__1, x__2, p__1, p__2), p__1))*(2*k*x__1-k*x__2)+(diff(f(x__1, x__2, p__1, p__2), x__2))*p__2/m-(diff(f(x__1, x__2, p__1, p__2), p__2))*(-k*x__1+2*k*x__2);

when i use

     pdsolve(PDE);

i get nothing,but i sure

    f=c*(p__1^2/m+p__2^2/m+4*p__1*p__2/m+6*k*x__1*x__2) 

is the one solution of the differential equation .

how i can get solutions about of the above equation.

thanks .

 

I am wondering if Selection Statement 'if' can be coded in Embedded Components such as Text Area.

I have typed codes in the Text Area(%text_beta_degress) as follows:

if %text_beta_degress=1.2 then Do(%text_ps=28);Do(%text_l4=5.439);
elif %text_beta_degress=8.77 then Do(%text_ps=15);Do(%text_l4=2.785);
elif %text_beta_degress=10 then Do(%text_ps=12.83);Do(%text_l4=2.348);
elif %text_beta_degress=14.4 then Do(%text_ps=5);Do(%text_l4=0.758);
end if

When I typed 1.2 or 8.77 into the Text Area(%text_beta_degress) and tapped 'Enter', %text_ps and %text_l4 didn't response.

Is there any solution?

How can I solve the following system in Maple for $S_1$ and $S_{i+1}$? I have the code written, but it is giving me nothing as output.

eq1 := Q-A*S[1]*C/X+B*D*(sum(S[j], j = 2 .. i+1))/Y-r[1]*S[1] = 0;
eq2 := A*S[i-1]*C/X-A*S[i]*C/X-B*S[i]*D/Y-r[1]*S[i] = 0;
eq3 := A*S[i]*C/X-B*S[i+1]*D/(Y+S[i+1])-r[2]*S[i+1] = 0;
solve({eq1, eq2, eq3}, {S[1], S[i+1]});

The only non-constants in the system are the $S_j$'s for $j = 1, \ldots, i+1$.

Here is the system in math mode:
$$Q-\frac{AC}{X}S_1-r_1 S_1 +\frac{BD}{Y}\sum\limits_{j=2}^{i+1}S_j = 0 \\
\frac{AC}{X}S_{i-1} - \frac{AC}{X}S_i - \frac{BD}{Y}S_i - r_1 S_i = 0\\
\frac{AC}{X}S_i - \frac{BD S_{i+1}}{Y+S_{i+1}} - r_2 S_{i+1} = 0 $$

I have a head start on it by hand, but it's too cumbersome to complete.

Basically, my strategy is to solve for $S_{i+1}$ as a function of $S_1$ and some constants. Then to plug in $S_2, \ldots, S_{i+1}$ in the summation and solve for $S_1$ as a function of constants. Then I would obtain $S_{i+1}$ as a function of constants itself.

Thanks for any help.

I'm trying to solve the differential equation.

Eq := diff(y(x), x, x) = -(x^2+1)*y(x)+K;

dsolve({Eq, y(-1) = 0, y(1) = 0}, y(x));

But this not work very well.

Best Regards,

First 58 59 60 61 62 63 64 Last Page 60 of 71