Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi!

I have the following problem

> restart:with(plots): Digits := 60:
> A:=42403:
> B:=269.95:
> C:=269.95:
> J1:=0.55:
> J2:=1.02:
> a:=196200:
> b:=14342220:
> c:=1589220:
> k:=157.08/0.0875:
> sys := {A-B*diff(x(t),t)=J1*diff(x(t),t,t)+C*(x(t)-y(t)),k*(J2*diff(y(t),t,t)-C*(x(t)-y(t)))=-(a+b*(diff(y(t),t)^2)/k^2+c*diff(y(t),t,t)),  D(x)(0) = 157.08, D(y)(0)=0, D(y)(10)=157.08,  D(x)(10) = 154.98}:
> dsn1 := dsolve(sys,numeric):
Error, (in dsolve/numeric/BVPSolve) matrix is singular

I need a help from someone who knows the GRTensor commands.

How do I write the last two terms of this equation of motion?How do I define Lagrangian matter, too?

My master said that I will do these calculations in the classic worksheet  maple18.

KGmn= (1/2) Tmn + (C0/2) Rabgl Tag Tbl gmn+ 3 C0 Rbrs(mTn)b Tsr – C0 Lm Rab Tab gmn + C0 Rab Tab Tmn+ 2 C0  Lm Rmrns Trs + C0ar(T(mr Tn)s)- C0sr(Tsr Tmn)

Lm =-(1/4) Fmn Fmn 

I'd like to view the Maple source code in .maple file. I am not able to find how to do this.

I tried commands in 136697-Can-One-Get-The-Source-Code-Back-From

which applies to .mla using the march command. But it did not work for .maple. It gives an error when trying it on .maple file.

I can open the .maple file in the Maple user interface OK using File->Open

but other than documentation, I see no Maple code.

I am looking now at Physics updates file, which can be downloaded as .maple file from 

https://maple.cloud/app/5137472255164416

Since most Maple code can be viewed, I assume one can also view the source code in the above.

Any idea how to do this?

Hey there,

I'm trying to numerically intergrate a function s(K,i,j) dK using runge kutta over a 2D grid of i,j values. Essentialy, performing the same sort of integral many different times for slightly different combinations of i and j. The function is more or less gaussian, and so the bulk of the result will come from the values of K around the peak of said gaussian. For some combinations of i and j, the function seems to have a singularity on the right edge of the gaussian peak, which causes my script to spit out an error, telling me the calculation cannot be performed further to the right past the singularity. Now, like i said before, the singularity is on the very edge of the gaussian and therefore I am perfectly happy to stop the integration before the singularity, because anything past it wont contribute very much to the result.

How can I use dsolve events to halt my integration just before hitting the singularity?

RK := (i, j) -> dsolve({diff(n(K), K) = K*s(K, a[i], b[j]), n(0) = 0}, numeric, method = rkf45)

 

trying some examples from 209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

I noticed some answer change when adding assumptions which should not really cause the answer to change. Numerically, both answers seem to be the same. But one is series solution and the other with assumptions added uses integrals.

In wave pde on string where left end at x=0 and adding assumptions x>0,t>0 to pdsolve should produce the same form and it does on some problems but no on others.

Compare

#example 19, wave pde, on string left end fixed, right end moving, with source, no initial velocity
restart;
pde := diff(u(x, t), t$2) = 4*diff(u(x, t), x$2)+(1+t)*x;
bc := u(0,t)=0,u(Pi,t)=sin(t);
ic := u(x,0)=0,eval(diff(u(x,t),t),t=0)=0;

sol:=pdsolve([pde, bc,ic],u(x,t));  #1
sol:=pdsolve([pde, bc,ic],u(x,t)) assuming t>0; #2
sol:=pdsolve([pde, bc,ic],u(x,t)) assuming x>0; #3
sol:=pdsolve([pde, bc,ic],u(x,t)) assuming t>0,x>0;  #4

(1,2,3) above give same answer which is 

but (4) gives

Tried random points and numerically they are the same (set the sum to n=100 to evaluate).

my question is why would adding no assuming, or adding t>0 on its own or adding x>0 on its own give same answer, but adding  t>0,x>0 at same time give such a different looking soution.

I typically adding such assumptions to be safe, but here it seems to had some side effect I have not noticed before.

Physics:-Version();
 "C:\Maple_updates\Physics+Updates.maple", 2018, December 22, 

    10:41 hours, version in the MapleCloud: 265, version installed in this computer: not installed

kernelopts(version)
  Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973

 

I try to solve ODE with conditions, but it give answer only without conditions:

SOT.mw

Thank you.

Is there any facility to apply Finite Volume Method to Partial idifferential equation on MAPLE?
Any comand?

Any Code?

Modify the procedure that implements the secant and tangent routines in such a way that instead of the number of iterations in the beginning give the given accuracy E, with which the approximation is to be determined.

As a result, the procedure should return the last approximation along with the iteration number.

===

===

 

I need help.

Hello,

I try to install MapleToolbox2018.0LinuxX64Installer.run I run it as root or with sudo command, but everytime I finish with below message:

Choose Maple 2018 Folder

Please specify the path to your existing Maple 2018 Installation.

 [/opt/maple2018]:  /opt/exp_soft/local/generic/maple/2018

----------------------------------------------------------------------------
Choose MATLAB Folder

Select your MATLAB installation.

 []: /opt/exp_soft/local/generic/matlab/R2016b

Warning: The installer has detected a previous version of the Maple Toolbox in
your MATLAB installation.
Press [Enter] to continue:
Warning: The directory
/opt/exp_soft/local/generic/matlab/R2016b
is not writable by the current user

I'm not sure what to do with it.

---
Regards,

Bartek

 

I have a vector A. I want to re-index vector A.

After re-indexing it, I will use the elements of the vector in new calculations.

For example:

 

k:=2:
M:=3:
A:=Vector[column]([seq(seq(p*q,q=0..M-1),p=1..2^(k-1))]);
C:=Vector[column]([seq(seq(c(p,q),q=0..M-1),p=1..2^(k-1))]); 
Equate(C,A);
c(1,0)+c(2,1);

c(1,0)+c(2,1)=2.

But the above code doesn' t work.

I have two list in which I need to substitute variables from on elist with variables in other list in an expression.

rootElements := [[a, Integer, c, Integer, -k*a, b], [Integer, c, a, Integer, b, -k*a], [Integer, a, b, -k*a, c, Integer], [Integer, a, Integer, c, -k*a, b]];

list1 := [[a[maximum], 0, c[maximum], 0, (-k*a)[minimum], b[minimum]], [0, c[minimum], a[maximum], 0, b[maximum], (-k*a)[maximum]], [0, a[minimum], b[maximum], (-k*a)[maximum], c[maximum], 0], [0, a[minimum], 0, c[minimum], (-k*a)[minimum], b[minimum]]]


let the term be

term :=a*c/(k*a+b);


Terms := seq(applyrule([seq(rootElements[i][j] = list1[i][j], j = 1 .. nops(list1[i]))], term), i = 1 .. nops(list1));

my outputs  are

a[maximum]*c[maximum]/(k*a[maximum]+b[minimum]),# k*a should be minimum, becuae I substituted a earlier it is failing
a[maximum]*c[minimum]/(k*a[maximum]+b[maximum]),
a[minimum]*c[maximum]/(k*a[minimum]+b[maximum]),# k*a should be maximum, becuae I substituted a earlier it is failing
a[minimum]*c[minimum]/(k*a[minimum]+b[minimum]);

is there a way to substitute larger terms first[like -k*a first] and goes to smaller variable??

 I am using applyrule since algsubs cannot do for more than one substitution.Also, I would be glad if any other alternative is provided.
thank you
 

>>> maple = pywinauto.application.Application().start(r'C:\Program Files\Maple 2015\bin.win\maplew.exe')
C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py:1044: RuntimeWarning: Application is not loaded correctly (WaitForInputIdle failed)
  warnings.warn('Application is not loaded correctly (WaitForInputIdle failed)', RuntimeWarning)
>>> maple.Maple.PrintControlIdentifiers()
__main__:1: DeprecationWarning: Method .PrintControlIdentifiers() is deprecated, use .print_control_identifiers() instead.
Traceback (most recent call last):
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 246, in __resolve_control
    criteria)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 453, in wait_until_passes
    raise err
pywinauto.timings.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\__init__.py", line 50, in wrap
    return method(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 585, in print_control_identifiers
    this_ctrl = self.__resolve_control(self.criteria)[-1]
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 249, in __resolve_control
    raise e.original_exception
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 431, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 191, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
    elements = find_elements(**kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 303, in find_elements
    elements = findbestmatch.find_best_control_matches(best_match, wrapped_elems)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findbestmatch.py", line 533, in find_best_control_matches
    raise MatchError(items = name_control_map.keys(), tofind = search_text)
pywinauto.findbestmatch.MatchError: Could not find 'Maple' in 'dict_keys([])'
>>> maple.Maple.print_control_identifiers()
Traceback (most recent call last):
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 246, in __resolve_control
    criteria)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 453, in wait_until_passes
    raise err
pywinauto.timings.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 585, in print_control_identifiers
    this_ctrl = self.__resolve_control(self.criteria)[-1]
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 249, in __resolve_control
    raise e.original_exception
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 431, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 191, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
    elements = find_elements(**kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 303, in find_elements
    elements = findbestmatch.find_best_control_matches(best_match, wrapped_elems)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findbestmatch.py", line 533, in find_best_control_matches
    raise MatchError(items = name_control_map.keys(), tofind = search_text)
pywinauto.findbestmatch.MatchError: Could not find 'Maple' in 'dict_keys([])'
>>>

 

I've made calculation as array := function(array1,array2). Then summ of all array[i] all in one cycle. If I look in summ variable I see fu(0+fu() +.. agebraical representation. I tried evalf(summ). still algebraical. How to derive numerically?

Hi

I want to solve quadratic eqution involving more than 2 parameters...want to analize unique soltuions and real roots also want to plot the real and unique region on graphs ....thanx

the equation is -delta*(Q*S*alpha*b-a*alpha^2+M*c+b*delta) where alpha is the varible and rest are paramters 

 


 

restart

PI := proc (p, e, q) options operator, arrow; p*S(p, e, q)+v*(q-S(p, e, q))-w*q-g(e)+(w-c)*q end proc

proc (p, e, q) options operator, arrow; p*S(p, e, q)+v*(q-S(p, e, q))-w*q-g(e)+(w-c)*q end proc

(1)

S := proc (p, e, q) options operator, arrow; q-(int(F(x), x = 0 .. q)) end proc

proc (p, e, q) options operator, arrow; q-(int(F(x), x = 0 .. q)) end proc

(2)

NULL

PI(p, e, q)

p*(q-(int(F(x), x = 0 .. q)))+v*(int(F(x), x = 0 .. q))-w*q-g(e)+(w-c)*q

(3)

g := proc (e) options operator, arrow; (1/2)*mu*e^2 end proc

proc (e) options operator, arrow; (1/2)*mu*e^2 end proc

(4)

``

F := proc (x) options operator, arrow; int(f(x), x = 0 .. q) end proc

proc (x) options operator, arrow; int(f(x), x = 0 .. q) end proc

(5)

P := proc (p, e, q) options operator, arrow; simplify(eval(PI(p, e, q), [alpha = 50, w = 10, mu = 10, c = 5, v = 1, f(x) = 1/2])) end proc

proc (p, e, q) options operator, arrow; simplify(eval(PI(p, e, q), [alpha = 50, w = 10, mu = 10, c = 5, v = 1, f(x) = 1/2])) end proc

(6)

Diff_p := diff(P(p, e, q), p)

q-(1/2)*q^2

(7)

Diff_e := diff(P(p, e, q), e)

-10*e

(8)

Diff_z := diff(P(p, e, q), q)

-p*q+p+q-5

(9)

``

``


 

Download Profit_code.mw

 

 

 

First 13 14 15 16 17 18 19 Last Page 15 of 1594