MaplePrimes Questions

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 .
      
                                           

In geom3d. I want to find the vertices A(x1,y1,z1), B(x2,y2,z2), where x1, y1, z1, x2, y2, z2 are integer numbers so that the triangle OAB  (O is origin) and perimeter and area are integer numbers. I tried

> resrart:

N:=5:

L:=[]:

for x1 from -N to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 from -N to N do

for y2 from -N to N do

for z2 from -N to N do

a:=sqrt(x1^2+y1^2+z1^2):b:=sqrt(x2^2+y2^2+z2^2):c:=sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2):

p:=(a+b+c)/2:

S:=sqrt(p*(p-a)*(p-b)*(p-c)):

if type(2*p, integer) and type(S, posint)

then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:

od: od: od: od: od: od:

nops(L);

But my computer runs too long. I can not receive the result. How to get the answer?

If I the length of the side are 6, 25, 29. I tried 

DirectSearch:-SolveEquations([(x2-x1)^2+(y2-y1)^2+(z2-z1)^2 = 6^2, (x3-x2)^2+(y3-y2)^2+(z3-z2)^2 = 25^2,  (x3-x1)^2+(y3-y1)^2+(z3-z1)^2 = 29^2], {abs(x1) <= 30, abs(x2) <= 20, abs(x3) <= 20, abs(y1) <= 20, abs(y2) <= 20, abs(y3) <= 20, abs(z1) <= 20,abs(z2) <= 20, abs(z3) <= 20}, assume = integer, AllSolutions, solutions = 1);

 

 

Does someone know how to ask Maple to compute intersection and union of ranges (for that matter Realrange)?

Does anyone know how Maple dsolve numeric integrators with adaptive stepsize like rkf45 and dverk78 select their stepsizes? Is there anyway to find out the stepsize the procedure chooses at each step? Currently, I can only obtain the value of my solution at a particular value but I do not know how many steps Maple took and why it selected these step sizes.

if I find fourier intergra solution if 1/pi∫ (form infintiy to 0)(a*cos(u*x)+u*sin(u*x))/a^2+u^2 du. can you polt the function to the integral converges? and can you plot the fourier intergral on a=1 and -1<=x<=3 with 0<=u<=20?

if  i use a fourier transform to find an integral representation for the solution is  U(x,t)=1-1/2*erf((x+a)/(2*square rootkt))+1/2*erf((x-a)/(2*square rootkt)), can you plot the sloution on the interval -5<=x<=5 with k=10^-6 and a=1 for t=10^5 and t=10^6 , give me two graph? erf mean is  Error function !

First 1504 1505 1506 1507 1508 1509 1510 Last Page 1506 of 2434