MaplePrimes Questions

how can I get a positive output in the following example

solve((hv*hw+lv*lw)/(lv+hv)*(lv+hv) = dw*(lv+hv), hv)

instead of -lv*(dw-lw)/(dw-hw) I would like lv*(dw-lw)/(hw-dw)

Hi. how can maple determine whether a vector is linear compostion of two or more vectors? 
for example w=a*v+b*u so that w is linear compostion of vectors u and v ( a and b are scalar numbers). tnx for the help.

 Given  any graph , I want to  determine the number of cycles of the graph .  What should I do?

I have this equation but maple solve root is 2

Root_eq.mw

Root is 4 x1 =1, x2= 8.95006470,

x3 =0 .6939575785

x4 = -0.6440222825

 


 

Local*Gamma:

v[1](x, t) = v[1]*(-x*v[1]-x*`θv`[2]-v[1]-v[2]+1)

 

v[2](x, t) = gamma*v[2]*(lambda-v[1]-v[2]-eta*(x*v[1]+x*`θv`[2]))

(1)

NULL


 

Download DTM_TO_SOlve.mw

Is there any way to transfer to transfer a table into Maple? I made a table in Google Sheets / Excel and I want to put it in my maple worksheet

 

Thanks in advance

What's going wrong here?

The Matrix is created by using the Matrix Palette. 

It seems that in a matix it is not possible to use division by a noninteger. Is that right?

(I use Maple 2018.2 and this is tested on both Windows and MacOS.)

Kind regards,

Mikkel


 

with*PDE(tools):

`∂`(v[1])/`∂`(t) = v[1]*[-x*v[1]-x*`θv`[2]-v[1]-v[2]+1]

 

`∂`(v[2])/`∂`(t) = gamma*v[2]*[lambda-v[1]-v[2]-eta*(x*v[1]+x*`θv`[2])]

(1)

``


 

Download DTM_TO_SOlve.mw

Hello, for an assignment I was given the task of iteratively calculating the water depth of a flow using Newton's method. For this I tried to create a procedure wich uses a number of input values. The code is listed below;

 

restart;
Newton := proc (n, y0, Q, b, m, k, S0) local A, P, Sf, y, F, dAdy, dPdy, Fdiff, i; global ylist; y[0] := y0; for i from 0 to n do A[i] := (b+m*y[i])*y[i]; P[i] := b+2*y[i]*sqrt(1+m^2); Sf[i] := Q*abs(Q)*P[i]^(4/3)/(k^2*A[i]^(10/3)); F[i] := S0/Sf[i]-1; dAdy[i] := b+2*m*y[1]; dPdy[i] := 2*sqrt(1+m^2); Fdiff := (2/3)*(F[i]-1)(5*dAdy[i]/A[i]-2*dPdy[i]/P[i]); y[i] := procname(evalf(y[i]-F[i](y[i])/Fdiff[i](y[i]))) end do; ylist := [seq(y[i], i = 0 .. n)]; return ylist end proc;

Newton(10, 1, 5, 12, 1, 30, 0.1e-4);
Error, (in Newton) invalid input: Newton uses a 2nd argument, y0, which is missing

 

As you can see, I get an error referring to the second argument y0, which is the starting value of the calculation. The error says the argument is missing, however it is right there in the brackets of the Newton procedure (along with the values of all other parameters). I have tried explicitly stating that y0:=1, and changing the name of the parameter, however that didn't help.

Am I missing something really simple, or is there something wrong with my code?

Thanks in advance.

Hi everybody

I try to save an array of equations in a "mpl file", and then read file and array by command read mpl file. But system error "bad id" occurs. Previously I saved this mpl file by "save" and read array by "read" command. I ran this code several times without any problem, suddenly error "bad id" occurred. When I save mpl file by the code edit region and then read it by "read" in the same or  a new worksheet, the error doesn't happen!
 What is wrong?
"Id" refers to the array index?

Thanks.
Maple 18 and Windows 10

Hi,

In order to improve the rendering of the table returned by DocumentTools:-Tabulate, I would have like it to contain the mathematical sign for infinity instead of the word infinity itself.
Example

a := infinity:
print(a);                      # what I would like to obtain
DocumentTools:-Tabulate([a]);  # contains the word "infinity"


Is it possible to fix this?
TIA

PS: Avoid spending too much time on it because it's only cosmetics

Fract := proc (P::posint, Q::posint) local p, q; for p to P-1 do for q to Q-1 do if is((P-p)*q-p*(Q-q) = 1) then return p/q, P/Q, (P-p)/(Q-q) end if end do end do end proc:#this procedure works Fract1 := proc (P::posint, Q::posint) local p, q; `~`[`~`[`/`@op]](select(type, map2(eval, [[p, q], [P-p, Q-q]], [isolve((P-p)*q-P*(Q-q) = 1)]), [[posint$2]$2]))[] end proc:#this procedure don't work Fract(7, 81);Fract1(7,81); Fract(39, 97);Fract1(39,97); Fract(101, 143);Fract1(101,143); Fract(11, 80);Fract1(11,80); Fract(15, 37);Fract1(15,37); Fract(22, 39);Fract1(22,39); Fract(25, 37);Fract1(25,37); Fract(21, 91);Fract1(21,91); Fract(13, 19);Fract1(13,91);

is possible to solvethis equation via maple?

hank you

EQUATION2.mw
 

restartNULL

alpha := 1.2*10^(-4); Betaa := 4.0*log(2); J := 13.4; delta := 15.3*10^(-9); tp := 10^(-13); tq := 8.5*10^(-12); tu := 90.0*10^(-12); kapa := 315; r0 := 2.0*10^(-7); Lx := 5.0*10^(-7); Ly := 5.0*10^(-7); Lz := 1.0*10^(-7); a := 0.7e-1*(Betaa/Pi)^.5*J/(15.3*10^(-22)); bb := exp(-((10^(-7)*x-(1/2)*Lx)^2+(10^(-7)*y-(1/2)*Ly)^2)/(2*r0^2)); print(aa = a); Q := a*exp(-z*10^(-7)/delta)*exp(-1.88*abs(t-2*tp)/tp)*bb

0.1200000000e-3

 

4.0*ln(2)

 

13.4

 

0.1530000000e-7

 

1/10000000000000

 

0.8500000000e-11

 

0.9000000000e-10

 

315

 

0.2000000000e-6

 

0.5000000000e-6

 

0.5000000000e-6

 

0.1000000000e-6

 

0.6917775548e21*ln(2)^.5

 

exp(-0.1250000000e14*((1/10000000)*x-0.2500000000e-6)^2-0.1250000000e14*((1/10000000)*y-0.2500000000e-6)^2)

 

aa = 0.6917775548e21*ln(2)^.5

 

0.6917775548e21*ln(2)^.5*exp(-6.535947712*z)*exp(-0.1880000000e14*abs(t-1/5000000000000))*exp(-0.1250000000e14*((1/10000000)*x-0.2500000000e-6)^2-0.1250000000e14*((1/10000000)*y-0.2500000000e-6)^2)

(1)

(diff(U(x, y, z, t), t)+tq*(diff(U(x, y, z, t), t, t)))/alpha = diff(U(x, y, z, t), x, x)+diff(U(x, y, z, t), y, y)+tu*(diff(U(x, y, z, t), x, x, t)+diff(U(x, y, z, t), y, y, t))+tu*(diff(U(x, y, z, t), z, z, t))+(Q+tq*(diff(Q, t)))/kapa

8333.333333*(diff(U(x, y, z, t), t))+0.7083333333e-7*(diff(diff(U(x, y, z, t), t), t)) = diff(diff(U(x, y, z, t), x), x)+diff(diff(U(x, y, z, t), y), y)+0.9000000000e-10*(diff(diff(diff(U(x, y, z, t), t), x), x))+0.9000000000e-10*(diff(diff(diff(U(x, y, z, t), t), y), y))+0.9000000000e-10*(diff(diff(diff(U(x, y, z, t), t), z), z))+0.2196119222e19*ln(2)^.5*exp(-6.535947712*z)*exp(-0.1880000000e14*abs(t-1/5000000000000))*exp(-0.1250000000e14*((1/10000000)*x-0.2500000000e-6)^2-0.1250000000e14*((1/10000000)*y-0.2500000000e-6)^2)-0.3509398517e21*ln(2)^.5*exp(-6.535947712*z)*abs(1, t-1/5000000000000)*exp(-0.1880000000e14*abs(t-1/5000000000000))*exp(-0.1250000000e14*((1/10000000)*x-0.2500000000e-6)^2-0.1250000000e14*((1/10000000)*y-0.2500000000e-6)^2)

(2)

``

 

Boundary condition:

U(0, y, z, t) = 300; U(Lx, y, z, t) = 300; U(x, 0, z, t) = 300; U(x, Ly, z, t) = 300; U(x, y, 0, t) = 300; U(x, y, Lz, t) = 300

#####################################

INITIAL CONDITIONS:

 

U(x, y, z, 0) = 300; (D[1](U))(x, y, z, 0) = 0

(D[1](U))(x, y, z, 0) = 0

(3)

NULL

 

``


 

Download EQUATION2.mw

 

 

when a variable has a value of 0.0 it seems to lose its units.

with(Units:-Standard):

temp := 0.*Unit('degC');
                           temp := 0.
convert(temp, temperature, kelvin);
Error, (in convert/temperature) insufficient information for a temperature conversion
 
temp := 0.1e-1*Unit('degC');
                   temp := 0.01 Unit(°C)
 
Is this true?  How are you supposed to do calculations for example at 0.0 C?
 
convert(temp, temperature, kelvin);
                      273.1600000 Unit(K)


 

socau := proc (sc) local sccl, sccl2, sccl3, nhanbiet, n, td, ii, t, nhanbiet1, kk, bnb, thonghieu, n2, thonghieu2, bth, vandung, n3, vandung3, bvd, bang1; sccl := round((2/5)*sc); sccl2 := round((2/5)*sc); sccl3 := round((1/5)*sc); nhanbiet := [1, 2, 3, 4, 5]; n := nops(nhanbiet); td := rand(0. .. 1.00); for ii to n do t := trunc(n*td()+1); nhanbiet1[ii] := nhanbiet[t]; nhanbiet[t] := nhanbiet[n]; n := n-1 end do; for kk to sccl do bnb[kk] := nhanbiet1[kk] end do; print(nhanbiet1); print(bnb); thonghieu := [6, 7, 8, 9, 10, 11]; n2 := nops(thonghieu); td := rand(0. .. 1.00); for ii to n2 do t := trunc(n2*td()+1); thonghieu2[ii] := thonghieu[t]; thonghieu[t] := thonghieu[n2]; n2 := n2-1 end do; for kk to sccl2 do bth[kk] := thonghieu2[kk] end do; print(thonghieu2); print(bth) end proc:

socau(11)

bth

(1)

Parse:-ConvertTo1D, "invalid left hand side of multiple assignment"


with result bc :=[result bnb and bth]

Download help_table.mw

please help me

 

 

First 716 717 718 719 720 721 722 Last Page 718 of 2425