MaplePrimes Questions

Hello!! Please help me,I need to solve a system of linear algebraic equations by running, and I solved the built-in command solve

restart;
with(plots):
f:=unapply(-x^2+1,x);
mu[1]:=unapply(1/(t^2+1),t);
mu[2]:=unapply(1/(t-5),t); 
g:=unapply(t^3-7*x,[t,x]);
l:=2; T:=3;
n:=10: m:=n: 
h:=evalf(l/n); 
tau:=evalf(T/m);
for k from 0 to n do 
x[k]:=h*k:
end do: 
for j from 0 to m do 
t[j]:=tau*j: 
end do:
ss:=evalf({seq(seq((y[k,j+1]-y[k,j])/tau=(y[k-1,j]-2*y[k,j]+y[k+1,j])/h^2+g(t[j],x[k]),k=1..n-1),j=0..m-1),seq(y[0,j]=mu[1](t[j]),j=1..m),seq(y[k,0]=f(x[k]),k=0..n),seq(y[n,j]=mu[2](t[j]),j=1..m)});
#s:=evalf(solve(ss,{seq(seq(y[k,j],k=0..n),j=0..m)}));

 

 We know the following facts: 

The SequenceGraph command returns a graph with the specified degree sequence given as input, if such a graph exists. It raises an exception otherwise. 
 But  If I  want to get more graphs  that satisfy this condition of degree sequence ? (If graphs are not many ,I want get all graphs better)
what should I do.?
For example: DrawGraph(SequenceGraph([3, 2, 2, 1, 1, 1]));  It returns the first graph below, but it is obvious that the second graph also fits the condition.

squenceGraph.mw


 

  restart:

#
# Define gamma as local (don't like doing this!)
#
  local gamma:local pi:
#
# Replaced 'indexed' parameters with 'inert subscript'
# parameters - otherwise one gets a problem defining
# both the unindexed 'phi' and the indexed phi[c]
#
  M__h := 100: beta__o := 0.034: beta__j := .025: mu__1 := 0.0004:
  epsilon := .7902: alpha := 0.11: psi := 0.000136: phi := 0.05:
  omega := .7: eta := .134: delta := .245: f := 0.21:
  M__v := 1000: beta__k := 0.09:   mu__v := .0005: M__c := .636:
  beta__g := 0.15: mu__c := 0.0019: pi :=0.01231: theta := 0.12: mu__e := 0.005
#
# D() is Maple's differential operator replated D(T)
# with DD(T) in the following to avoid confusion
#
  ODE1 := diff(B(T), T) = M__h-beta__o*B(T)-beta__j*B(T)-mu__1*B(T)+epsilon*G(T)+alpha*F(T):
  ODE2 := diff(C(T), T) = beta__o*B(T)*J(T)-beta__j*C(T)-(psi+mu__1+phi)*C(T):
  ODE3 := diff(DD(T), T) = beta__j*B(T)*L(T)- beta_o*E(T)-(omega+mu__1+eta)*DD(T):
  ODE4 := diff(E(T), T) = beta_o*E(T)-beta__j*C(T)-(delta+mu__1+eta+phi)*E(T):
  ODE5 := diff(F(T), T) = psi*C(T)-(alpha+mu__1)*F(T)+f*delta*E(T):
  ODE6 := diff(G(T), T) = omega*DD(T)-(epsilon+mu__1)*G(T)+(1-f)*delta*E(T):
  ODE7 := diff(H(T), T) = M__v-beta__k*H(T)-mu__v*H(T):
  ODE8 := diff(J(T), T) = beta__k*H(T)-mu__v*J(T):
  ODE9 := diff(K(T), T) = M__c-beta__g*K(T)-mu__c*K(T):
  ODE10:= diff(L(T), T) = beta__g*K(T)-mu__c*L(T):
  ODE11:= diff(M(T), T) = pi*(DD(T)+ theta*E(T))-mu__e*M(T):

  B0 := 100: C0 := 90: D0 := 45: E0 := 38:
  F0 := 10: G0 := 45: H0 := 50: J0 := 70: K0 :=20: L0:= 65: M0 :=22:
#
# Solve system
#
  ans := dsolve( { ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7, ODE8,
                   B(0) = B0, C(0) = C0, DD(0) = D0, E(0) = E0,
                   F(0) = F0, G(0) = G0, H(0) = H0, J(0) = J0, K(0) = K0, L(0) = L0, M(0) = M0,
                 },
                 numeric
               );
#
# Plot solutions for a few of the dependent variablss
# just to show everything is working (more-or-less!)
#
  plots:-odeplot( ans, [T, B(T)], T=0..5);
  plots:-odeplot( ans, [T, C(T)], T=0..5);
  plots:-odeplot( ans, [T, DD(T)], T=0..5);
  plots:-odeplot( ans, [T, E(T)], T=0..5);
  plots:-odeplot( ans, [T, F(T)], T=0..5);
  plots:-odeplot( ans, [T, G(T)], T=0..5);
  plots:-odeplot( ans, [T, H(T)], T=0..5);
  plots:-odeplot( ans, [T, J(T)], T=0..5);
  plots:-odeplot( ans, [T, K(T)], T=0..5);
  plots:-odeplot( ans, [T, L(T)], T=0..5);
  plots:-odeplot( ans, [T, M(T)], T=0..5);

Error, missing operator or `;`

 

``


 

Download MltxPLOTS.mw

Hello Dear,

I have the following equation

 This equation is satisfied if the coefficients are zero.

So I need an order in Maple to write that

 

Good evening!!! I have a task to implement the task of Cauchy by the method of Milne, wrote the code, but did not understand it until the end, help to understand? what's wrong?
First calculate four "initial" values by the method of Runge-Kutta methods, then use the method of Milne, the Fact that two times running, perhaps extra?

restart;
with(plots):
a:=0; b:=1; eps:=evalf(10^(-3)):
f:=unapply(2*x*(x^2+y),x,y);
G:=simplify(dsolve({diff(y(x),x)=f(x,y(x)),y(a)=1}));                    
N:=15: h:=(b-a)/N:
for i from 0 to N do 
x[i]:=a+i*h: 
end do:
y[0]:=1;
s[0]:=1;
for i from 0 to 2 do 
t[1]:=evalf(h*f(x[i],y[i])):
t[2]:=evalf(h*f(x[i]+h/2,y[i]+t[1]/2)): 
t[3]:=evalf(h*f(x[i]+h/2,y[i]+t[2]/2)):
t[4]:=evalf(h*f(x[i]+h,y[i]+t[3])):
y[i+1]:=evalf(y[i]+(t[1]+2*t[2]+2*t[3]+t[4])/6):
q[1]:=evalf(h*f(x[i],s[i])):
q[2]:=evalf(h*f(x[i]+h/2,s[i]+q[1]/2)): 
q[3]:=evalf(h*f(x[i]+h/2,s[i]+q[2]/2)):
q[4]:=evalf(h*f(x[i]+h,s[i]+q[3])):
s[i+1]:=evalf(s[i]+(q[1]+2*q[2]+2*q[3]+q[4])/6):
end do;
for i from 3 to N-1 do 
y[i+1]:=evalf(y[i-3]+((4*h)/3)*(2*f(x[i],y[i])-f(x[i-1],y[i-1])+2*f(x[i-2],y[i-2]))):
s[i+1]:=evalf(s[i-1]+(h/3)*(f(x[i+1],y[i+1])+4*f(x[i],s[i])+f(x[i-1],s[i-1]))):
d[i+1]:=abs(y[i+1]-s[i+1])/29:
if abs(d[i+1]) < eps then y[i]:=y[i]:
else y[i]:=s[i];
end if: end do;
s1:=plot(rhs(G),x=a..b,color=yellow):
s2:=pointplot({seq([x[k],y[k]],k=0..N)}): 
display(s1,s2);

 

So I have this expression

f:=(coth(x)^(1/3)-tanh(x)^(1/3))*(coth(x)^(2/3)+tanh(x)^(2/3)+1)

which Maple can not simplify?

I need to do it like this

`assuming`([expand(simplify(add(`~`[simplify]([op(combine(expand((coth(x)^(1/3)-tanh(x)^(1/3))*(coth(x)^(2/3)+tanh(x)^(2/3)+1))))]))))], [x > 1])

Is this actually true or what is happening here?

Hi

I have a first oder PDE, I use pdsolve I obtained a solution depend on function F

condition_unique_solution.mw

 

My question: The boundary condition  f(x,y) = 1 is supplied on the line y = k x, where k is a constant. For which k
does there exist a unique solution for f(x, y)?

 

Many thanks for your help

 

Let there be an infinite sequence of real numbers: A=a[0], a[1], ... .
Let P = (n -> sum(a[i]*x^i, i=0..n)).
What is A if for all n: P(n) has n real roots.

Hi there

I'm an old user of Maple, but I've never been able to plot functions with unit. You can see my latest attempt down below

b := 120*Unit('mm');
h := 200*Unit('mm');
V := 8*Unit('kN');

I__x := (1/12)*b*h^3

Q(x):=(1/2)*((1/4)*h^2-(100*Unit('mm')-x)^2)*b 
tau(x):=V*Q(x)/(I__x*b)

plot(Q(x(Unit('mm')), units), x = 0*Unit('mm') .. 100*Unit('mm'))

Plot_function_with_units.mw

If anyone is able to help me with this problem, I would greatly appreciate it.

Hi 

I solve the laplace equation written in polar coordinates in annular domain.
The code run without any error 

But there is no solution displayed after running the code, note that I use Maple 18

Laplace_annulardomain.mw

Many thinks for your help

I want to divide each row of Marix A by diagonal element. In for loop, when I assign dividing results to the letter , the type of A still remains matrix, but if I choose another letter (like B) results are stored in Table. Why? How can I assign to a matrix?

Also I can't figure out why maple doesn't show elements of table(see worksheet file).

I should notice that my main problem is assigning not dividing.

worksheet.mw

 

i want to design a packaging container to hold 320 sphere-shaped chocolates that each has a diameter 1.8 cm and weights about 3.2g each. i hope can get all posible shape using maple18 .

 

Good morning everyone, 

I have a problem, when I try to evaluate the definite integral below, Maple can not provide a result. What can I do so that the Maple can calculate this integral?

This is the Maple code with the result:

 

 

restart

with(VectorCalculus):

with(LinearAlgebra):

with(CodeGeneration):

N := 1:

M := 2:

``

for i to N do rpv1 || i := 0; rpv2 || i := 0; rpv3 || i := 0; for j to M do rpv1 || i := VectorCalculus:-`+`(rpv1 || i, Typesetting:-delayDotProduct(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), Phi || i || j)); rpv2 || i := VectorCalculus:-`+`(rpv2 || i, Typesetting:-delayDotProduct(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), `&varphi;` || i || j)); rpv3 || i := VectorCalculus:-`+`(rpv3 || i, Typesetting:-delayDotProduct(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), gamma || i || j)) end do; rp || i := Matrix([[rpv1 || i], [rpv2 || i], [rpv3 || i]]) end do:

``

for i to N do rppv1 || i := 0; rppv2 || i := 0; rppv3 || i := 0; for j to M do rppv1 || i := VectorCalculus:-`+`(rppv1 || i, Typesetting:-delayDotProduct(diff(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), s), Phi || i || j)); rppv2 || i := VectorCalculus:-`+`(rppv2 || i, Typesetting:-delayDotProduct(diff(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), s), `&varphi;` || i || j)); rppv3 || i := VectorCalculus:-`+`(rppv3 || i, Typesetting:-delayDotProduct(diff(diff(VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^j, s), s), gamma || i || j)) end do; rpp || i := Matrix([[rppv1 || i], [rppv2 || i], [rppv3 || i]]) end do:

``

``

for i to N do for j from 0 to 0 do U || i || j := 0 end do end do:

for i to N do for j from 0 to 0 do V || i || j := 0 end do end do:

for i to N do for j from 0 to 0 do W || i || j := 0 end do end do:

for i to N do for j from 0 to VectorCalculus:-`+`(M, -2) do U || i || (VectorCalculus:-`+`(j, 1)) := VectorCalculus:-`+`(U || i || j, VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^VectorCalculus:-`+`(j, 1)) end do end do:

for i to N do for j from 0 to VectorCalculus:-`+`(M, -2) do V || i || (VectorCalculus:-`+`(j, 1)) := VectorCalculus:-`+`(V || i || j, VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^VectorCalculus:-`+`(j, 1)) end do end do:

for i to N do for j from 0 to VectorCalculus:-`+`(M, -2) do W || i || (VectorCalculus:-`+`(j, 1)) := VectorCalculus:-`+`(W || i || j, VectorCalculus:-`*`(VectorCalculus:-`+`(s, VectorCalculus:-`-`(xi || i)), 1/L || i)^VectorCalculus:-`+`(j, 1)) end do end do:

for i to N do f || i := VectorCalculus:-`+`(Typesetting:-delayDotProduct(VectorCalculus:-`*`(Typesetting:-delayDotProduct(E, A), 1/mu), VectorCalculus:-`+`(VectorCalculus:-`+`(rpp || i, VectorCalculus:-`-`(VectorCalculus:-`*`(rpp || i, 1/evalc(norm(Re(rp || i), 2))))), VectorCalculus:-`*`(Typesetting:-delayDotProduct(rp || i, Typesetting:-delayDotProduct(rp || i^%T, rpp || i)), 1/evalc(norm(Re(rp || i), 2))^3))), Typesetting:-delayDotProduct(g, e3)) end do:

for i to N do for j to VectorCalculus:-`+`(M, -1) do fun || i || j := int(VectorCalculus:-`*`(U || i || j, Row(f || i, 1)), s = xi || i .. L || i) end do end do;

fun11

(int((s-xi1)*(E*A*(2*Phi12/L1^2-2*Phi12/(sqrt((gamma11/L1+2*gamma12*s/L1^2-2*gamma12*xi1/L1^2)^2+(`&varphi;11`/L1+2*`&varphi;12`*s/L1^2-2*`&varphi;12`*xi1/L1^2)^2+(Phi11/L1+2*Phi12*s/L1^2-2*Phi12*xi1/L1^2)^2)*L1^2)+(Phi11/L1+(2*(s-xi1))*Phi12/L1^2)*((2*(Phi11/L1+(2*(s-xi1))*Phi12/L1^2))*Phi12/L1^2+(2*(`&varphi;11`/L1+(2*(s-xi1))*`&varphi;12`/L1^2))*`&varphi;12`/L1^2+(2*(gamma11/L1+(2*(s-xi1))*gamma12/L1^2))*gamma12/L1^2)/((gamma11/L1+2*gamma12*s/L1^2-2*gamma12*xi1/L1^2)^2+(`&varphi;11`/L1+2*`&varphi;12`*s/L1^2-2*`&varphi;12`*xi1/L1^2)^2+(Phi11/L1+2*Phi12*s/L1^2-2*Phi12*xi1/L1^2)^2)^(3/2))/mu+g*e3)/L1, s = xi1 .. L1))*e[x]

(1.1)

``

NULL

``


 

Download integral.mw

 

Thank you !

If I have checked the Editable button just below the working window, then the temperature would be very high in the next time when I start Maple 2019. I do not what is going on. But when I unchecked the Editable button, and wait for several seconds, then the temperature and the load of my laptop are on the normal state.  Is this a bug for Maple 2019? My OS is Debian Stretch, that is,

$ uname -a
Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux

 

First 398 399 400 401 402 403 404 Last Page 400 of 2132