MaplePrimes Questions

a1 := Diff(x1(s,t),s$2) = a*x1(s,t)+b*x2(s,t)+c*x3(s,t)+d*u(t);
b1 := Diff(x2(s,t),s$2) = e*x1(s,t)+f*x2(s,t)+g*x3(s,t)+h*u(t);
c1 := Diff(x3(s,t),s$2) = i*x1(s,t)+j*x2(s,t)+k*x3(s,t)+l*u(t);
sys := [a1, b1, c1];
sol := pdsolve(sys);

sol := pdsolve(sys);
[Length of output exceeds limit of 1000000]

I want to solve the equation x^2 + y^2 = 1, where x, y are rational numbers. How can I tell Maple to do that?

Hi all, 

I am quite new to maple. Thanks for your help in advance. 

Could I define a general function f of a single variable x, f(x), without specifying its explicit form? I know it is simple to define functions of specific forms, e.g., f(x)=2*x (In maple: f:=x->2*x). I try to define a function without knowing its form, e.g., f:=x->f(x), expecting maple return f(y) if I type >>f(y). But this does not work (Maple says:

Error, (in temp) too many levels of recursion). 

 

Is it possible to define a general function f(x) without specific form in maple? Thank you again. 

Hi,

I get the error in the following code

restart:

gama1:=0.01:

zet:=0;
#phi0:=0.00789:
Phiavg:=0.02;
lambda:=0.01;
Ha:=1;


                               0
                              0.02
                              0.01
                               1
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-Ha^2*u(eta))+((1/(eta)+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]/(eta)*diff(T(eta),eta) ));
eq3:=diff(phi(eta),eta)+phi(eta)/(N[bt]*(1+gama1*T(eta))^2)*diff(T(eta),eta);
      /  d   /  d         \\   mu1[w] (1 - u(eta))
      |----- |----- u(eta)|| + -------------------
      \ deta \ deta       //         mu(eta)      

           /             /  d           \\               
           |      mu_phi |----- phi(eta)||               
           | 1           \ deta         /| /  d         \
         + |--- + -----------------------| |----- u(eta)|
           \eta           mu(eta)        / \ deta       /
                                /      /                        
                                |      |                        
/  d   /  d         \\     1    |      |  rho(eta) c(eta) u(eta)
|----- |----- T(eta)|| + ------ |k1[w] |- ----------------------
\ deta \ deta       //   k(eta) |      |         5000 p2        
                                \      \                        

                                /  d           \
     (a[k1] + 2 b[k1] phi(eta)) |----- phi(eta)|
                                \ deta         /
   + -------------------------------------------
                                          2     
         1 + a[k1] phi1[w] + b[k1] phi1[w]      

            /  d         \\\
     k(eta) |----- T(eta)|||
            \ deta       /||
   + ---------------------||
           k1[w] eta      ||
                          //
                                      /  d         \
                             phi(eta) |----- T(eta)|
          /  d           \            \ deta       /
          |----- phi(eta)| + ------------------------
          \ deta         /                          2
                             N[bt] (1 + 0.01 T(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,eq1):
eq2:=subs(phi(0)=phi0,eq2):
eq3:=subs(phi(0)=phi0,eq3):

#A somewhat speedier version uses the fact that you really need only compute 2 integrals not 3, since one of the integrals can be written as a linear combination of the other 2:
Q:=proc(pp2,fi0) local res,F0,F1,F2,a,INT0,INT10,B;
global Q1,Q2;
print(pp2,fi0);
if not type([pp2,fi0],list(numeric)) then return 'procname(_passed)' end if:
res := dsolve(subs(p2=pp2,phi0=fi0,{eq1=0,eq2=0,eq3=0,u(1)=lambda/(phi(1)*rhop/rhobf+(1-phi(1)))*D(u)(1),D(u)(0)=0,phi(1)=phi0,T(1)=0,D(T)(1)=1}), numeric,output=listprocedure):
F0,F1,F2:=op(subs(res,[u(eta),phi(eta),T(eta)])):
INT0:=evalf(Int((1-eta)*F0(eta),eta=0..1-zet));
INT10:=evalf(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet));
B:=(-cbf*rhobf+cp*rhop)*INT10+ rhobf*cbf*INT0;
a[1]:=2/(1-zet^2)*B-10000*pp2;
a[2]:=INT10/INT0-Phiavg;
Q1(_passed):=a[1];
Q2(_passed):=a[2];
if type(procname,indexed) then a[op(procname)] else a[1],a[2] end if
end proc;
#The result agrees very well with the fsolve result.
#Now I did use a better initial point. But if I start with the same as in fsolve I get the same result in just about 2 minutes, i.e. more than 20 times as fast as fsolve:

Q1:=proc(pp2,fi0) Q[1](_passed) end proc;
Q2:=proc(pp2,fi0) Q[2](_passed) end proc;
Optimization:-LSSolve([Q1,Q2],initialpoint=[6.5,exp(-1/N[bt])]);


proc(pp2, fi0)  ...  end;
proc(pp2, fi0)  ...  end;
proc(pp2, fi0)  ...  end;
              HFloat(6.5), HFloat(0.006737946999)

 

 

the error is :

Error, (in Optimization:-LSSolve) system is singular at left endpoint, use midpoint method instead

how can I fix it.

Thanks

 

Amir

the point given as follows:

x=[3,4,5,6,7]...

y=[7.42494922444550, 3.67768248674133, 2.52235142453921, 1.95610223891559, 1.61770309810016]

 

I have plotted the point and the output is like this:

plot_output.docx

how to smooth the curve and extend the curve longer 

 

please help me.....

 

 

 

How to draw an object in 3d which is like a spring

3 layers of circle already enough

Who was the creator of Maplesoft?

A friend asked me a question and I didn't know the answer to give him. So I decided to share the question with you guys. According to him, Is there an inbuilt function in maple that we can use to specify "time" on a worksheet/document? What the time does is to run or execute the worksheet/document at the time stipulated. Meaning in his absense, he wants maple to run a particular worksheet at a particular time which he will decide.Hope my question is sensible?

Is there some sort of analog of  option  discont=true  in  plot3d?  Can I remove these vertical cylindrical surfaces in the following example? They correspond to the zeros of the denominator:

plot3d((x^2+sin(x))/(y^2+cos(x)), x = -7 .. 7, y = -5 .. 5, view = [-7 .. 7, -6 .. 6, -1 .. 7], numpoints = 50000, scaling = constrained, axes = normal);

plots[implicitplot](y^2+cos(x), x = -7 .. 7, y = -5 .. 5, scaling = constrained, numpoints = 5000);

 

 

I want to solve the following problem:

Print  (a, b, c, d, e, f, g, h)

this  should satisfies

1, a,b,c,d,e,f,g,h are integers  from -10 to 10

2, a+b+c+d+e+f+g+h=4 and a+2b+3c+4d+6e+8f+12g+24h=24

Please help me.

Thank you very much.

 

Or I didn't get something right? This is with Maple 16.02 on a Mac:

maple worksheet snapshot

 

> for i from 1 to 10 while i<=5 do print(i) end do; #works all right
> for i from 1 to 10 while i>=5 do print(i) end do; #nothing shows up?

M5 :=series((1+1/(2*a^2)+(1/2)*b^2-1/(2*a))^a, a=0,3);

there is a variable b too

M6 := 1+(-ln(2)-2*ln(a))*a+(-1+(1/2)*(-ln(2)-2*ln(a))^2)*a^2;
with(gfun):
seriestoratpoly(series(M6, a, 4), ['egf']);

I'm trying to solve the following inequality:

ln(x+1)<x^2-1

but the solve command returns:

"Warning, solutions may have been lost"

Can someone halp me?

Thank you.

Carmelita

I am trying to write procedures in MAPLE to deal with pseudo differential operators such as P=1+f_1D^{-1}+f_2D^{-2}+f_3D^{-3}+...,  where D=d/dx, f_i are functions of x. D^n for n<=0 work like usual differetial operators for n>=0. For example D^nD^m=D^{m+n}, D^n f=\sum_{i>=0}\binom{n}{i}(D^i f)D^{n-i}, where \binom{n}{i} are binomial coefficients given by n(n-1)...(n-i+1)/i! for n<= 0. I am wondering which package in MAPLE I could begin with, and how can I define D^{-1} and generally D^{-n}.

Thank you very much!

First 1484 1485 1486 1487 1488 1489 1490 Last Page 1486 of 2429