MaplePrimes Questions

hello everybody!

I want to create a random symmetric matrix which have det=2. I just made it like this, no better than those ones. Thanks!

Doixung := proc (n)

local A, i, j; A := Matrix(n);

n := LinearAlgebra[Dimension](A);

for i to n do A[i, i] := RandomTools[Generate](integer(range = 1 .. 20))

   end do;

for i to n do

     for j to n do

           while j < i do A[i, j] := RandomTools[Generate](integer(range = 1 .. 20)) end do;

           while i < j do A[i, j] := A[j, i] end do

     end do

end do;

print(A) end proc

Hello everbody.

Newton:=proc(p[0],TOL,N)  

 local i,p,f;   i:=1;

 while i<= N do      

     p:=p[0]-(f(p[0]))/(diff(f(p[0]),x));    

     if abs(p-p[0])<TOL then             return p;     else i:=i+1;            p[0]:=p; end if;  

end do;

printf("The method failed after N iterations,N=%d",N);  end proc:

hi all

i have this code and want to plot(NphiB1,y). but it is not plotted.

help me plz

restart:
nB0:=1:
hb:=6.63*10^(-34):
aB:=1/(3*(3*nB0*Pi^2)^(1/3)):
gB:=4*Pi*aB/mB:
xiphase:=1/sqrt(4*mB*gB*nB0):
qcB:=8.26*10^(-3)/xiphase:
qB:=y*qcB:
v1:=-gB*nB0:
v0:=4*gB*nB0:

L:=1.5*xiphase:
k2:=sqrt(qB^2+2*mB*v1):
k3:=sqrt(qB^2-2*mB*v0):
beta:=k3*L:
W:=2*cos(beta)*(qB/k2-k2/qB):
Q:=sin(beta)*(qB/k3-k3/qB+qB*k3/k2^2-k2^2/k3/qB):
P:=sin(beta)*(qB/k3-k3/qB-qB*k3/k2^2+k2^2/k3/qB):
theta1 := -arctan((Q*(-P*Q+sqrt(Q^2*W^2+W^4-W^2*P^2))/(Q^2+W^2)+P)/W):
b1:=(theta1+k2*L)/(2*k2):
Stheta1 := -(Q*(-P*Q+sqrt(Q^2*W^2+W^4-W^2*P^2))/(Q^2+W^2)+P)/(W*sqrt(1+(Q*(-P*Q+sqrt(Q^2*W^2+W^4-W^2*P^2))/(Q^2+W^2)+P)^2/W^2)):
Ctheta1 := 1/sqrt(1+(Q*(-P*Q+sqrt(Q^2*W^2+W^4-W^2*P^2))/(Q^2+W^2)+P)^2/W^2):
phiB1=evalf(-arctan((1/4)*(cos(2*qB*b1)*(sin(beta)*(-qB/k3-k3/qB+qB*k3/k2^2+k2^2/qB/k3)+cos(theta1)*sin(beta)*(-qB/k3-k3/qB-qB*k3/k2^2-k2^2/qB/k3)+2*sin(theta1)*cos(beta)*(-qB/k2-k2/qB))+sin(2*qB*b1)*(4*cos(theta1)*cos(beta)-2*sin(theta1)*sin(beta)*(k2/k3+k3/k2)))/(-sin(2*qB*b1)*(sin(beta)*(-qB/k3-k3/qB+qB*k3/k2^2+k2^2/qB/k3)+cos(theta1)*sin(beta)*(-qB/k3-k3/qB-qB*k3/k2^2-k2^2/qB/k3)+2*sin(theta1)*cos(beta)*(-qB/k2-k2/qB))+cos(2*qB*b1)*(4*cos(theta1)*cos(beta)-2*sin(theta1)*sin(beta)*(k2/k3+k3/k2))))):
NphiB1:=evalf(phiB1/Pi);
#SNphiB1:=simplify(NphiB1);
plot(NphiB1,y);

Hello everbody!

Jacobi:=proc(A::Matrix,b::Vector,x,epsilon,m)  

uses LA=LinearAlgebra;  

local      i,k,n:= LA:-RowDimension(A),    

        x:= Vector(LA:-RowDimensions(A)),    

        p:= Vector(LA:-RowDimensions(A));  

k:=1;

 while  k<=n do      

       for i to n while i<>j do          

          x[i]:=1/(A[i,i])*(-add(A[i,j]*p[j],j=1..n)+b[i]);       end do;      

        if abs(x-p)<epsilon do return x; end if;    

       k:=k+1;    

       p:=x;

 end do;  

x;  

end proc:

Why the interface typesettings option doesn't affect the content of a MathContainer?

I opened a new document. Then I inserted the command interface(typesetting=extended); to improve the visualization of a disequation's solution. It works in the worksheet, but it doesn't work in the content of a MathContainer.

Hello! I have written a algorithm. Can you help me find errors? thank you very much. sorry, my English is not very good!

LL:=proc(A::Matrix)
uses LA= LinearAlgebra;
local i, j, k, n:= LA:-RowDimension(A),
L:= Matrix(LA:-Dimensions(A));
L[1,1]:=sqrt(A[1,1]);
for j from 2 to n do
L[j,1]:=(A[j,1])/(L[1,1]);
end do;
for i from 2 to n-1 do
L[i,i]:=(A[i,i]-add(L[i,k]^(2),k=1..i-1))^(1/(2));
for j from i+1 to n do
L[j,i]:=(1/L[i,i])*(A[j,i]-add(L[j,k]*L[i,k],k=1..i-1));
end do;
end do;
L[n,n]:=(A[n,n]-add((L[n,k])^(2),k=1..n-1)^(1/(2));
L;

I want to know the mistakes i have made in the documents attached to get the expected results every time.

NULL

Case 1: control = works fine now.

M1 := K__1*A*(Matrix(2, 2, {(1, 1) = 1, (1, 2) = -1, (2, 1) = -1, (2, 2) = 1}))/l__1 = Matrix(2, 2, {(1, 1) = 0.30e-2, (1, 2) = -0.30e-2, (2, 1) = -0.30e-2, (2, 2) = 0.30e-2})

NULL

NULL

Case 2: control = prints answer in next line.M1 := K__1*A*(Matrix(2, 2, {(1, 1) = 1, (1, 2) = -1, (2, 1) = -1, (2, 2) = 1}))/l__1 = Matrix([[K__1*A/l__1, -K__1*A/l__1], [-K__1*A/l__1, K__1*A/l__1]]) = Matrix(2, 2, {(1, 1) = 0.300000000000000e-2, (1, 2) = -0.300000000000000e-2, (2, 1) = -0.300000000000000e-2, (2, 2) = 0.300000000000000e-2})

NULL

control = prints expression and answer in the next line.

case 3

M1 := K__1*A*(Matrix(2, 2, {(1, 1) = 1, (1, 2) = -1, (2, 1) = -1, (2, 2) = 1}))/l__1 = Matrix([[K__1*A/l__1, -K__1*A/l__1], [-K__1*A/l__1, K__1*A/l__1]]) = Matrix(2, 2, {(1, 1) = 0.300000000000000e-2, (1, 2) = -0.300000000000000e-2, (2, 1) = -0.300000000000000e-2, (2, 2) = 0.300000000000000e-2})

NULL

Numeric formating does not function in case2 and cae 3. I dont know shat hv i done for these things to occur. But what should i do?

NULL

 

Download onlineResultandNumeric_format_doesnot_work_in_some_casesWhy.mwonlineResultandNumeric_format_doesnot_work_in_some_casesWhy.mw

Ramakrishnan V

rukmini_ramki@hotmail.com

Math_File.docxMath_File.docx 

I have been using MapleSoft since 2013 to solve mathematical problem. However, I could not solve the following set of differential equations.  Would you please, solve the problem and return the file how you solve it? Thanks in advance.

Is it possible to make a call to any of the plot options without using it's designated name?

I don't know if I'm clear enough but for example

Instead of
plot({x^2,x+1},linestyle=[dash,dashdot])

use some argument that designates the first and second option etc ...
for example like
plot({x^2,x+1},linestyle=["%1","%2"])

Hello,

 I am trying to solve an differential equation in Maple, but I have no response from Maple.Can someone give a look for me? The coefficients a and b cannot be zero.

 Thanks a lot.

 

Download edo_solução_A_U.mw

Hello,

I'm having some issues with this procedure it seems to take a very long time to evaluate. There is also an error in the Histogram I can't seem to fix... Does anybody know why? Any help would be greatly appreciated! Thank you in advance!

Kind regards,

Gambia man

Last_part2.mw

Hello everybody

I have a system of ODEs that are too large. I am trying to solve this system using Maple. The corrsponding file has been uploaded. I have 2 question. 1- Does anyone know what is the source of error? 2- Is this a high expectation for Maple to solve such a too big system of ODEs. Note: It makes a few minutes to run all the programm.

Thanks in advance

M.mw

Hello

i have an ODE like this:

I sove this ODE with plot order:

with(plots);
odeplot(sol, [x, (3*D1*a+4*D2)*P(x)/((1-q*S(x))*D2)], .5 .. (1/2)*Pi, tickmarks = [[seq((1/10)*i*Pi = (180*i*(1/10))*`°`, i = 1 .. 8)], default]);
my plot work very well. but i need to plot this ODE with five different parameter (q for for instance, q=0.1 & q=0.2 ....) all in one axis. something like this:

Hello,

I try make 2 calculation with one commant. So there should be two seperate answers in the last line. Who can help me? So the last line should be 2.387 and 0.

restart;
restart;
st := time():
ifactor(49! + 1);
(1021) (3119969417) (7374967) (139935066631148413819385559764102\

  5027693) (18503)
time() -st;
                             2.387
restart;
st := time():
isprime(49! + 1);
                             false
time() -st;
                               0.

I have some problems about plotting in Maple.

Question1. I have tried to plot this function for different intervals, but there is no resulting graph.

plot(1+18*(sinh(9*x-9)-sinh(3*x-477))^2/(9*cosh(9*x-9)+cosh(3*x-477))^2,x=-4..4);

What do you think why this happens?

Question2. plot(1+18*(sinh(9*x-9/2)-sinh(3*x-477/2))^2/(9*cosh(9*x-9/2)+cosh(3*x-477/2))^2,x=-1..1);

The graph of this function is a wierd one. Is there any problem?

 

First 1202 1203 1204 1205 1206 1207 1208 Last Page 1204 of 2434