MaplePrimes Questions

How can I get the vlaue of matric c?

Thanks for your help


restart;
with(Student[LinearAlgebra]);
a := Matrix(2, 2, [[1, 2], [3, 4]]);
                               [1  2]
                          a := [    ]
                               [3  4]
b := Matrix(2, 2, [[2, 4], [6, 2]]);
                               [2  4]
                          b := [    ]
                               [6  2]
c := multiply(a, b);
                              /[1  2]  [2  4]\
                 c := multiply|[    ], [    ]|
                              \[3  4]  [6  2]/
evalm(c);
           [        /   [2  4]\          /   [2  4]\]
           [multiply|1, [    ]|  multiply|2, [    ]|]
           [        \   [6  2]/          \   [6  2]/]
           [                                        ]
           [        /   [2  4]\          /   [2  4]\]
           [multiply|3, [    ]|  multiply|4, [    ]|]
           [        \   [6  2]/          \   [6  2]/]
 

This is my first problem with Maple but i am pretty confused as to why it would struggle with these steps.

Just using a standard worksheet, here is what i have:

> f:=(4^x)+1

>g:=x^4

> solve(g=f,x)

now, i would just expect this to come back with 3 answers, but instead i get 

Warning, solutions may have been lost
                     RootOf(-4^_Z - 1 + _Z^4)

if I do:

>fsolve(g=f,x)

It comes back with only one of the answers(2.094012853), instead of all three.

What am I doing wrong?

I mean, for example,

solve({4*x1+7*x2+6*x3 = 186, floor((1/2)*x1)+floor((1/5)*x2)+floor((1/3)*x3) = 18, 
floor((1/5)*x1)+floor((1/2)*x2)+floor((1/4)*x3) = 21});
Warning, solutions may have been lost

A finite number of the solutions can be found by DirectSearch

DirectSearch:-SolveEquations([floor((1/2)*x1)+floor((1/5)*x2)+floor((1/3)*x3) = 18, 
floor((1/5)*x1)+floor((1/2)*x2)+floor((1/4)*x3) = 21, 4*x1+7*x2+6*x3 = 186], 
{x1 >= -100, x2 >= -100, x3 >= -100, x1 <= 100, x2 <= 100, x3 <= 100}, 
AllSolutions, solutions = 3, number = 1000);

Matrix(3, 4, [[0., Vector[column](3, [0., 0., 0.]),
 [x1 = 74.18778903830886, x2 = 58.93905207777524, x3 = -87.22075344961036], 185], 
[0., Vector[column](3, [0., 0., 0.]),
 [x1 = 71.22714241634635, x2 = 56.43467122661542, x3 = -82.32521137528222], 164],
 [0., Vector[column](3, [0., 0., 0.]), 
[x1 = 73.6407870507502, x2 = 58.33738250527096, x3 = -86.15413762331626], 165]])

I don't see a way to obtain the MMA answer (in Maple notation)

(155/2 < x1 and x1 < 78 and 744/7-4*x1*(1/7) < x2 and x2 < 62 or 72 <= x1 and x1 <= 73 and
 102-4*x1*(1/7) < x2 and x2 < 62 or 73 < x1 and x1 <= 147/2 and 102-4*x1*(1/7) < x2 and
 x2 <= 726/7-4*x1*(1/7) or 147/2 < x1 and x1 < 74 and 60 <= x2 and x2 <= 726/7-4*x1*(1/7) or
 74 <= x1 and x1 < 75 and 726/7-4*x1*(1/7) < x2 and x2 < 62 or 153/2 < x1 and x1 < 78 and
 726/7-4*x1*(1/7) < x2 and x2 < 60 or x1 = 72 and 58 <= x2 and x2 < 60 or 72 < x1 and x1 < 74 and
 58 <= x2 and x2 <= 708/7-4*x1*(1/7) or 75 <= x1 and x1 < 76 and 102-4*x1*(1/7) < x2 and x2 < 60 or
 x1 = 74 and 442/7 < x2 and x2 < 64 or 74 < x1 and x1 < 75 and 738/7-4*x1*(1/7) < x2 and 
x2 <= 744/7-4*x1*(1/7) or 74 <= x1 and x1 < 75 and 708/7-4*x1*(1/7) < x2 and x2 <= 102-4*x1*(1/7) or 
151/2 < x1 and x1 < 76 and 708/7-4*x1*(1/7) < x2 and x2 < 58 or 157/2 < x1 and x1 < 80 and
 762/7-4*x1*(1/7) < x2 and x2 < 64 or 68 <= x1 and x1 < 137/2 and 56 <= x2 and x2 <= 666/7-4*x1*(1/7) or
 x1 = 137/2 and x2 = 56 or x1 = 70 and 56 < x2 and x2 < 58 or 70 < x1 and x1 <= 71 and 56 <= x2 and
 x2 < 58 or 71 < x1 and x1 < 72 and 56 <= x2 and x2 <= 690/7-4*x1*(1/7) or 70 <= x1 and x1 <= 281/4 and
 54 <= x2 and x2 < 55 or 281/4 < x1 and x1 < 72 and 54 <= x2 and x2 <= 666/7-4*x1*(1/7)) and
 x3 = 31-2*x1*(1/3)-7*x2*(1/6)

PS. MMA_solution.pdf MMA_solution.mw

Recently, my post is deleted without my knowledge.

https://www.mapleprimes.com/posts/209617-How-To-Plot-Stream-Line-contour?sp=209617

 

I have 2 same integrals, but there is difference between  them at the end.WHy?


 

``

restart

N := 8:

I__1 := add(int(zt*ro[i], zt = Z[i] .. Z[i+1]), i = 1 .. N)

(1/2)*ro[1]*(-Z[1]^2+Z[2]^2)+(1/2)*ro[2]*(-Z[2]^2+Z[3]^2)+(1/2)*ro[3]*(-Z[3]^2+Z[4]^2)+(1/2)*ro[4]*(-Z[4]^2+Z[5]^2)+(1/2)*ro[5]*(-Z[5]^2+Z[6]^2)+(1/2)*ro[6]*(-Z[6]^2+Z[7]^2)+(1/2)*ro[7]*(-Z[7]^2+Z[8]^2)+(1/2)*ro[8]*(-Z[8]^2+Z[9]^2)

(1)

ro := Vector(8, {(1) = 2051.904, (2) = 2051.904, (3) = 2051.904, (4) = 2051.904, (5) = 2051.904, (6) = 2051.904, (7) = 2051.904, (8) = 2051.904})

Z := Vector(9, {(1) = -0.4998720000e-6, (2) = -0.3749040000e-6, (3) = -0.2499360000e-6, (4) = -0.1249680000e-6, (5) = 0, (6) = 0.1249680000e-6, (7) = 0.2499360000e-6, (8) = 0.3749040000e-6, (9) = 0.4998720000e-6})

I__2 := add(int(zt*ro[i], zt = Z[i] .. Z[i+1]), i = 1 .. N)

0.1e-19

(2)

I__1-I__2

-0.1e-19

(3)

``

``

``

``

``

``

``


 

Download Ajib.mw

I am trying to solve a set of differential equations in maple. The maple code:

de1:=diff(u1(x,t),x)=-h*(u1(x,t))+i*exp(-i*t)*(u2(x,t));
              d
       de1 := -- u1(x, t) = -h u1(x, t) + i exp(-i t) u2(x, t)
              dx

> de2:=diff(u1(x,t),t)=(-h-i/2)*u1(x,t)-h*exp(-i*t)*u2(x,t);

         d
  de2 := -- u1(x, t) = (-h - 1/2 i) u1(x, t) - h exp(-i t) u2(x, t)
         dt

> dsolve({de1,de2},{u1(x,t),u1(x,t)});
 

However, when I execute it, maple show "Warning: system is consistent". How to remove it

I have a matrix 50*500000 was computed through a loop. when I double click on it I faced with the following error.

Rtable browser error

unable to display structured data

 

What the problem is?

I asked a question about importing a matrix with symbolic entries the other day.  Just got email saying there had been a reply.  But I can't find my question or that reply!  ............Edgar

Hi,

I would like to translate a set of ODEs from Maple to FORTRAN and optimize them. The problem is that even I have all the equations in one file the maple uses some names in optimizations same as what it has used before. How can I fixed it?

for Example:

with(codegen, optimize, makeproc, cost, prep2trans):

Fortran(eq_dP_5, optimize, resultname = fp1);
      t2 = int(z5 ** 2)
      t3 = int(t2 ** 2)
      t5 = int(z4 ** 2)
      t6 = int(x ** 2)
      t8 = x - 1
      t9 = t8 ** 2
      t10 = 1 / t9
      t11 = t10 * t6 * t5
      t13 = int(mTh ** 2)
      t23 = 2 * z2 * x + z4 * x - 2 * z2
      t26 = 1 / z4
      t32 = Az5 ** 2
      t38 = int(z6 ** 2)
      fp1 = -dble(z4) / dble(t23) / dble(t8) * (dble(t11 * t3 * LmdSF) +
     # dble(2 * t11 * t13 * t2) + dble(2 * t26 / Az5 * t23 * Bz5 * z6 *
     #t8) - 0.16D2 * dble(t10) * t32 * z1 * dble(t6) * dble(t5) * 0.3141
     #592654D1 - dble(2 * t26 * t38 * t23 * t9 * x) + dble(4 / x * t26 *
     # t8 * z2)) * (z1 + valrho) / 0.4D1

Fortran(eq_dmu_5, optimize, resultname = fmu2);
      t1 = z6 ** 2
      t2 = z4 / 0.2D1
      t5 = x ** 2
      t6 = t5 ** 2
      t28 = z5 ** 2
      t29 = t28 ** 2
      t32 = Az5 ** 2
      t35 = mTh ** 2
      t39 = z4 ** 2
      t49 = (x - 1) ** 2
      t50 = t49 ** 2
      fmu2 = (t1 * (z2 + t2) * t6 * dble(x) - 0.5D1 * t1 * (z2 + 0.2D1 /
     # 0.5D1 * z4) * t6 + 0.10D2 * (z2 + 0.3D1 / 0.10D2 * z4) * t1 * t5
     #* dble(x) - 0.10D2 * (z2 + z4 / 0.5D1) * t1 * t5 + ((0.5D1 * z2 +
     #t2) * t1 + 0.4D1 * (LmdSF * t29 / 0.16D2 + t32 * 0.3141592654D1 *
     #valrho + t35 * t28 / 0.8D1) * t39 * z4) * dble(x) - z2 * t1) * dbl
     #e(x) / dble(t50)

 

 

I get this message everytime I am trying to open my worksheet: "Recover Corrupt File and Save As"

2.G_anden_aflevering.mw

Is there a simple (i.e. without using of op( ), coeff( ), etc.)  way to force Maple to put a common constant out of brackets in the expression like 2*a+2*b -> 2(a+b)? The task seems as very simple. But I can't find a solution

I've tried alot, but nothing seems to work. The problem occurres whenever im trying to use multiple SI Units in caculations that require division. Example:

"`E__n`:=n->-6.63*10^(-34)&lobrk;J&robrk;*&lobrk;s&robrk;*3*10^(8)*&lobrk;m&robrk;/(&lobrk;s&robrk;)*1.097*10^(7)&lobrk;m&robrk;^(-1)*1/(n^(2)):"

Error, null

Parse:-ConvertTo1D, "invalid input %1", 3

 

""

"eV:=x->x/(1.602*10^(-19)&lobrk;J&robrk;/(&lobrk;eV&robrk;))"

Error, null

Parse:-ConvertTo1D, "invalid input %1", 6

 

``


 

Download Maple_prob1.mw

 

 

Hello!

I have a pretty simple problem and I feel pretty dumb just asking this. 
If I have a 2x2 Matrix and I remove one column and one row, how do I get the result to be a scalar, not 0th vector?

R := RandomMatrix(2);
R1 := DeleteRow(R,-1);
R2 := DeleteColumn(R1,-1);


                         R := [ -82  41 ]
                                  [-70  91]
                        R1 := [-82  41]
                          R2 := [-82]

 

I am trying to find the positive integer numbers a, b, c, d, e, f so that the function y =  (a x^2 + b x + c)/(d x^2 + e x + f) is increasing function and the equation  (a x^2 + b x + c)/(d x^2 + e x + f) = x has three integer solutions. I tried
restart;
ListTools[Categorize];
L := [];
for a to 10 do
for b to 10 do
for c to 10 do
for d to 10 do
for e to 10 do
for f to 10 do
if a*e-b*d > 0 and a^2*f^2-a*b*e*f-2*a*c*d*f+a*c*e^2+b^2*d*f-b*c*d*e+c^2*d^2 < 0 and igcd(a, b, c) = 1 and igcd(d, e, f) = 1 and igcd(a, b, c, d, e, f) = 1 and x = (a*x^2+b*x+c)/(d*x^2+e*x+f) then L := [op(L), [a, b, c, d, e, f, x]]

L:=[op(L), [a, b, c, d,e,f,x]]; fi; 
od: od: od: od:od:od: 
nops(L);  


I did not get the result. 
With Mathematica, I got like this picture (a, b, c, d, e, f, x1, x2, x3)

How can I get the correct results?

 

Is it possible to save table settings (and set a new default), so I dont have to manually change the "indent" number in every table i make in a document?

 

Its not possible to save the settings in the table menu itself, and there is no "table" option under preferences.

Almost Happy maple user on macbook pro 18

 

First 774 775 776 777 778 779 780 Last Page 776 of 2427