MaplePrimes Questions

Hi

I have a simple Maple application with two TextArea components (TextArea0 and TextArea1) inside.

The start up code is following:

#++++++++++++++++++
Actions := module()
export DoNothing;
   
    DoNothing := proc()
    end proc;
    
end module; #Actions
#++++++++++++++++++


the action when cotents change for both TextArea components is

#++++++++++++++++++
use Actions in
DoNothing();
end use;
#++++++++++++++++++

The problem:
When I change the focus from one TextArea component to another and press Restart maple server then an error appears:

Error in Component TextArea1 with caption "TextArea": `Actions` is not a module or member.
Haw can it be fixed? Thank you.

problem_with_modul.mw

 

The dot product of vector v and u= ||v|| ||u||fosters also vector u*v=XvXu+Yv=A, v=<2,5>, u=<4,9>.

As it says in the title, I would like to solve the following ODE numerically using forward Euler method, without using the Student Package.

 

(dy(t))/(dt)=t(1-0.3t)-(ty)(1+0.6t)

with initial condition y(0)=1. I want to solve it for up to t=1, and then plot both the solution by Euler's method and the solution by "dsolve" on the same graph so I can compare them.

 

Also, can I make a separate DEplot with t extending to 5?

 

Thanks in advance.

When I open the MapleCloud palette, I see a small list of user documents under the rubric "Popular". Is there a significantly longer list I can access to browse?

 

Assume that |T(z)| < 1. Why does it follow that (T(z))r → 0 as r → ∞?

(Hint |(T(z))r| = |T(z)|r.) Deduce from the above that, as k→∞, we have T(Nk(z)) → 0. Why does it follow that Nk(z)→i ?

What is the corresponding result when |T(z)| > 1 ?

(Hint: Let l/T(z) = U(z)so that |U(z)| < 1, then apply the same argument (check U(N(z)) = (U(z))2noting that U-1(0) = -i).

Now consider the two regions of the plane:

R+ = {Nk{z) → as k → ∞}; R- {Nk(z) → -i as k → ∞}.

Draw a diagram to illustrate these regions, the line L and the roots and -i. We call R+ the basin of attraction for the root +i, and similarly R-is the basin of attraction for the root -i.

 

Show that if is on the set (the common boundary of the two regions R+ and R_, then Nk(z) stays on L for all values of k. (This is easy once you identify what is). So in this case iteration does not produce a root at all.

 

It would be appreciated if any one could help me with clear up my confusion with questions.

Thanks a lot.

Dear users

A friend of of mine has a problem with an integral and since it's for his thesis, it's pretty important. 

That's why I ask it here cause I don't know where to ask it elsewhere, so if it's wrong posted, completely my bad.

l:=(y*o)/(v);

R:=(Phi*o)/v;

A:=5*(a*ln(R)+b);

P:=sqrt(1+4*k^2*l^2*(1-exp^(-l/a)));

M:=int((2)/(1+P),o);

With other words, I want to integrate the wole thing to the variable o, who appears in the variables l and R.

Somehow, when I put this in Maple, it won't solve it. Probably it's just a stupid fault or i just forget something, but i don't find it. Does anyone knows how to solve it?

Already a lot of thanks!

 

Hi, I have the feeling I ran into this before, but can't find the answer, so here goes:

I want to create an animated plot of a histogram, changing the range of data to be histogrammed. So I type:

plots:-animate(Statistics:-Histogram,[dR*~WindowN(RP0,Ci,CangleWidth+Ci),ignore=true],Ci=-0.5 .. 0.2);

The error I am getting is

Error, (in MathPad:-WindowN) cannot determine if this expression is true or false: Ci < HFloat(0.39995) and HFloat(0.0) <= -HFloat(0.34995000000000004)+Ci

What happens here is that dR is a Vector of data with RP0 being another Vector equally long. I have a library function called WindowN that returns a Vector of the same length as its argument, with 1. for the elements within the window, undefined for the elements outside. The windowing algorithm is just a straightforward if, in a loop over the elements. This all works and I get a correct Histogram plot if I set the window numerically and call Histogram. CangleWidth is preset to 0.05.

Here the window to use is supposed to be set by the animate command. I expect Ci to be set to numbers in the range given (25 points default) and prepare the plots. But it looks like the WindowN routine gets an unevaluated Ci. I tried evalf(Ci) or eval(Ci) in the arglist, to no avail. Ci is not used or set before this call to animate.

I can see how I can workaround this but I think this should work as is. plots:-animate works for me in other contexts.

Any ideas?

Mac Dude

Following previous question at

http://www.mapleprimes.com/questions/149581-Improve-Algorithm-Dsolve

and also

http://www.mapleprimes.com/questions/149243-BVP-With-Constraining-Integrals

I wrote the following code

***********************

restart:

gama1:=0:


phi0:=0.00789:


rhocu:=2/(1-zet^2)*int((1-eta)*rho(eta)*c(eta)*u(eta),eta=0..1-zet):

eq1:=diff(u(eta),eta,eta)+1/(mu(eta)/mu1[w])+((1/(eta-1)+1/mu(eta)*(mu_phi*diff(phi(eta),eta)))*diff(u(eta),eta)):
eq2:=diff(T(eta),eta,eta)+1/(k(eta)/k1[w])*(2/(1-zet^2)*rho(eta)*c(eta)*u(eta)/(p2*10000)+( (a[k1]+2*b[k1]*phi(eta))/(1+a[k1]*phi1[w]+b[k1]*phi1[w]^2)*diff(phi(eta),eta)-k(eta)/k1[w]/(1-eta)*diff(T(eta),eta) )):
eq3:=diff(phi(eta),eta)-phi(eta)/(N[bt]*(1-gama1*T(eta))^2)*diff(T(eta),eta):
mu:=unapply(mu1[bf]*(1+a[mu1]*phi(eta)+b[mu1]*phi(eta)^2),eta):
k:=unapply(k1[bf]*(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2),eta):
rhop:=3880:
rhobf:=998.2:
cp:=773:
cbf:=4182:
rho:=unapply(  phi(eta)*rhop+(1-phi(eta))*rhobf ,eta):
c:=unapply(  (phi(eta)*rhop*cp+(1-phi(eta))*rhobf*cbf )/rho(eta) ,eta):
mu_phi:=mu1[bf]*(a[mu1]+2*b[mu1]*phi(eta)):

a[mu1]:=39.11:
b[mu1]:=533.9:
mu1[bf]:=9.93/10000:
a[k1]:=7.47:
b[k1]:=0:
k1[bf]:=0.597:
zet:=0.5:
#phi(0):=1:
#u(0):=0:
phi1[w]:=phi0:
N[bt]:=0.2:
mu1[w]:=mu(0):
k1[w]:=k(0):

eq1:=subs(phi(0)=phi0,u(0)=0,eq1):
eq2:=subs(phi(0)=phi0,u(0)=0,eq2):
eq3:=subs(phi(0)=phi0,u(0)=0,eq3):

p:=proc(pp2) global res,F0,F1,F2:
if not type([pp2],list(numeric)) then return 'procname(_passed)' end if:
res := dsolve({eq1=0,subs(p2=pp2,eq2)=0,eq3=0,u(0)=0,u(1-zet)=0,phi(0)=phi0,T(0)=0,D(T)(0)=1}, numeric,output=listprocedure):
F0,F1,F2:=op(subs(res,[u(eta),phi(eta),T(eta)])):
evalf(2/(1-zet^2)*Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*( F1(eta)*rhop*cp+(1-F1(eta))*rhobf*cbf )/(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))-pp2*10000:
end proc:


s1:=Student:-NumericalAnalysis:-Secant(p(pp2),pp2=[6,7],tolerance=1e-6);

                   HFloat(6.600456858832996)

p2:=%:



ruu:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))):
phb:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))) :
TTb:=evalf(2/(1-zet^2)*(Int((1-eta)*F2(eta),eta=0..1-zet))):
rhouu:=evalf(2/(1-zet^2)*(Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))):
with(plots):
res(parameters=[R0,R1]):
odeplot(res,[[eta,u(eta)/ruu],[eta,phi(eta)/phb],[eta,T(eta)/TTb]],0..zet);

 

*************************************

as you can see at the second line of the code, the value of phi0:=0.00789. however, I want to modify the code in a way that phi0 is calculated with the following addition constraint

evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet)))-0.02=0

I would be most grateful if you could help me in this problem.

Thanks for your attention in advance

Amir

I've asked this question before but this time around there's a new twist. I want to plot a parametric plot of the function below. z is Complex and i'm plotting the roots of z in the numerator to the roots of z in the denominator.

6*(20*z^5+137*z^4+450*z^3+850*z^2+900*z+420))

/(300*z^6-1490*z^5+4197*z^4-7800*z^3+9600*z^2-7200*z+2520)

hope it makes sense this time around.

 

Is there a way to tell Maple to expand a complex function in Laurent series around a point, and have it show the series expansion that are valid for different regions? Either by the user telling it which region to use, or it automatically shows all regions?

For example, given

f(z):= z-> (3*z+1)/((z-1)*(z+1))

This has a pole at z=1 and at z=-1. I want to expand this around z=1. Hence it will have Laurent series in the annulus between z=1 and z=-1, but there is also region outside z=-1 that goes to infinity. So there are two regions.

When I do

with(numapprox);
laurent((3*z+1)/(z^2-1),z=1);

Maple gives the correct Laurent series for the region in the annulus |Z-1|<2, i.e. the first region (the one inside the two singularities).

But I want to see the expansion for different region, for |z-1|>2 (to check if I did it ok). This is what I get btw

3/(z-1) - 2/(z-1)^2 + 4/(z-1)^3 - 8/(z-1)^4 +.... 

Do I need a special package for this?

Fyi, I found this question here but it does not really answer my question. I want to speficy both the point of expansion, and also the region itself.

 

 

I need to create a function from one list to another, but I don't want to define an operation.  I only want to assign a 1-1 mapping from a list of 64 elements to another list of 64 elements, i.e. the 1st element in list a is assigned to the 1st element in list b, etc.  I see plenty of examples of how to do this with an operation, but I don't want the mapping to perform any operation, just the mapping.  How is this done?

Hello!!

 

I am trying to solve rigid nody dynamics on Maplesim!! Trying to simulate Gyroscopic Effect.. I want to plot Angular Momentum of that rigid body!!

 

How do I do this??

 

Thanks

[> restart;
[> OPTIMAL:=proc(f,Condition::set)
local vars,L,S,SS,k,m,K,Fmax,Fmin,sol_min,sol_MIN,sol_max,sol_MAX;
vars:=indets(f,name) union indets(Condition,name);
L:=map(convert,Condition,equality);
K:=combinat[choose](L);
S:=NULL:
for k to nops(k) do if solve(K[k])<>NULL then
extrema(f,K[k],vars,'s||k'):S:=S,a||values(s||k):fi od:
SS:={}
for k to nops([s]) do
if type(s[k],set) then SS:=SS union evalc(s[k]) fi od;
SS:=remove(has,SS,l);
S:=NULL:
for k to nops(ss) do if type(SS[k],set(equation)) and
map(evalb,evalf(simplify(subs(SS[k],Condition))))={true}
then S:=S,vatue(ss[k]) fi od;
SS =[s];
Fmax:=-infinity:
for k to nops(SS) do
if evalf(simplify(subs(ss[k],f)))>evalf(Fmax)
then Fmax:=simplify(value(subs(SS[k],f)));sol_max:=SS[k]; fi;od;
sol_MAX:=sol_max:
for k to nops(SS) do
if Fmax=simplify(value(subs(SS[k],f)))
and (SS[k] minus sol_max)<>{} then
sol_MAX:=sol_MAX,Ss[k] fi od;
‘Fmax'=simplify(expand(Fmax)),sol_MAX:
Fmin:=infinity:
for k to nops(SS) do
if evalf(simplify((subs(SS[k],f))))<evalf(Fmin)
then Fmin:=simplify((subs(SS[k],f)));sol_min:=SS[k]; fi;od;
sol_MIN:=sol_min:
for k to nops(SS) do
if Fmin=simplify(value(subs(SS[k],f)))
and (SS[k] minus sol_min)<>{} then
sol_MIN:=sol_MlN,SS[k] fi od;
RETURN('F[min]'=simplify(expand(Fmin)),sol_MlN,
'F[max]'=simplify(expand(Fmax)),sol_max);
end: ↵

" Error, unable to match delimiters"
  Please, help me.
I don't understand. Thank you, thank you.

C(n,k)=((2*(k-2-n))/(k*(k-1)))*C(n,k-2)
if n in {even} then C(n,0)=((-1)^(n/2))*(factorial(n)/factorial(n/2)) and C(n,1)=0
if n in {odd} then C(n,0)=0 and C(n,1)=(2*(-1)^((n-1)/2))*(factorial(n)/factorial((n-1)/2))

i've been trying for hours to get a procedure involving this to work :(

Thanks

I want to make a plot of this function sine and imaginary cosine below,

psi(x):=sin(k*x)+I*k*l[2]*cos(k*x);

where

k:=n*pi/L;
 
L=1,n=1,l[2]=1;

plot(psi(x),x=0..5);

Plotting error, empty plot.

i always recieve this Error. Can someone help me with this. You can take any range of x including Pi if you wish , and as well provide me with refrences Text book on ploting functions if He/She knows. Looking forward for feedbacks. Thank you very much .
      
                                           

First 1503 1504 1505 1506 1507 1508 1509 Last Page 1505 of 2433