Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

system_of_PDE.pdf

How to solve the system of partial differential equations in Maple.  I have attached a pdf file, please check it. Kindly help me.

Thank you

[Edit: I've also atached the OP's worksheet below.--Carl Love]

not_solve_sys_pde.mw

Hello there, 

Would you allow me to ask this question?

What I tried in the worksheet below is to map an expression to x-axis and another expression to y-axis, while both expressions have the same input (or independent variable). However, the resulting plot still shows those two expressions as two separate curves. Would you tell me how to map or assign the expressions to each axis?


 

restart;

with(LinearAlgebra):

Digits := 6:

j := I:

L__adpu := 1.66;
L__aqpu := 1.61;
L__lpu := 0.15;
R__apu := 0.003;
E__tpu := 1.0;
MVA := 555;

1.66

 

1.61

 

.15

 

0.3e-2

 

1.0

 

555

(1)

A__sat := 0.0312500:
B__sat := 6.93147:

I__tpu_compare := (P__t - j* Q__t) / E__tpu;

-(1.00000*I)*Q__t+1.00000*P__t

(2)

I__tpu_a := abs(I__tpu_compare);

abs(-(1.00000*I)*Q__t+1.00000*P__t)

(3)

Phi := arccos(P__t / (I__tpu_a * E__tpu));

arccos(1.00000*P__t/abs(-(1.00000*I)*Q__t+1.00000*P__t))

(4)

E__a__tilde := E__tpu + (R__apu + j * L__lpu) * I__tpu_compare;

1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t)

(5)

psi__at := abs(E__a__tilde);

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))

(6)

psi__I := A__sat * exp(B__sat * (psi__at - 0.8));

0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518)

(7)

K__sd := psi__at / (psi__at + psi__I);

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))/(abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))+0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518))

(8)

K__sq := K__sd;

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))/(abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))+0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518))

(9)

X__ad := K__sd * L__adpu:

X__d := X__ad + L__lpu:

X__aq := K__sq * L__aqpu:

X__q := X__aq + L__lpu:

delta__i := arctan((X__q * I__tpu_a * cos(Phi) - R__apu * I__tpu_a * sin(Phi))/(E__tpu + R__apu * I__tpu_a * cos(Phi) + X__q * I__tpu_a * sin(Phi))):

e__q := E__tpu * cos(delta__i):

i__d := I__tpu_a * sin(delta__i + Phi):

i__q := I__tpu_a * cos(delta__i + Phi):

i__fd := (e__q + R__apu * i__q + X__d * i__d)/(X__ad):

i_armature := sqrt(i__d^2 + i__q^2):

i_armature2 := subs(P__t = 0, i_armature):

i_armature3 := subs(P__t = 0.5, i_armature):

i_armature4 := subs(P__t = 1.0, i_armature):

plotA := plot(i_armature2, Q__t = -0.6..0.6):

plotB := plot(i_armature3, Q__t = -0.6..0.6):

plotC := plot(i_armature4, Q__t = -0.6..0.6):

plots:-display([plotA, plotB, plotC]);

 

i__fd2 := subs(P__t = 0, i__fd):

i__fd3 := subs(P__t = 0.5, i__fd):

i__fd4 := subs(P__t = 1.0, i__fd):

 

plotD := plot(i__fd2, Q__t = -0.6..0.6):

plotE := plot(i__fd3, Q__t = -0.6..0.6):

plotF := plot(i__fd4, Q__t = -0.6..0.6):

plots:-display([plotD, plotE, plotF]);

 

plot([i__fd2, i_armature2, Q__t = -0.6..0.6]); #failed, two expressions are plotted seperately.

 

 

 


Best Regards, 

In Kwon Park 

Download Q20210416.mw

How to solve the Linear first-order partial differential equation by the Lagrange method. Suppose u and v are dependent variables and x,y,z are independent variables of a partial differential equation of the form:

dx/f(x,y,z)=dy/g(x,y,z)=dz/h(x,y,z)=du/k(x,y,z)=dv/s(x,y,z). I need its solution in the form of u and v . How to find it ?

Hi!

How to get the plot of the system of the equation below:

Tau >=0.Plot.mw

I did not succeed.

Thanks

Hello there, 

Would you tell me how to treat differentiation as an operator?

Here is a simple example:

(The content of the worksheet is supposed to be here, but that did not work)

Download Q20210407.mw

The 'coeff' operation shows 'psi__d0' as the only coefficient of 'Delta__delta(t)', while what I wanted to see is the 'Desired' expression in the worksheet, '(psi__d0 + psi__q0 / omega__0 * D)' as the coefficients. Here, 'D' represents the differentiation. 

Thank you, 

In Kwon Park 

Hi!

I am double checking some textbook methods involving the arc length of a parabolic function of y.  I need to calculate the x coordinate that represents half the arc length of the parabola from x=0 to x=1

I have included my work in the form of a maple worksheet.  Help on this would be appreciated.

Have a great day!Test_solve_for_x.mw

I am trying to find Lie subalgebra for finding optimal solutions directly with the help of MAPLE.  Please help me to find it. Share MAPLE code please.

Just A Simple Fouier Transform Example:

Given x(t) = exp(-2*t) u(t) and X(ω) is equal to 1/(j*omega + 2);

Use The Frequency Differentiation of Fourier Transform to the Given Problem and Plot With An Amplitude Spectrum Graph:

Sorry Everyone: I am trying To Learn This Software and Need A Bit Of Help: I am Trying To Solve & Plot With An Amplitude Spectrum Graph #A & Problem #B. Can Anyone Help: 

Sorry I Do Not Know How & I Can Find Very Little Via Google a Google Search and Thank You A Million Times For Anyone That Can Help Me With Problems. 

#A). t*x(t)
#B). t^2*X(t)

#Solution To Example Problem #A 't*x(t)':

(t)^nX(t)->(j)^n*((ⅆ)^n)/((ⅆ)^( )omega^n)(X(omega));

n := -1;
                        
X := omega -> 1/(2 + j*omega);


diff([j^n*diff(X(omega), [omega $ n])], omega);

Greetings!

I am unable to evaluate an improper integral involving rational, exponential and Bessel functions. Can Maple do it? if not is there a way around.

test.mw

Yesterday, user @lcz , while responding as a third party to one of my Answers regarding GraphTheory, asked about breadth-first search. So, I decided to write a more-interesting example of it than the relatively simple example that was used in that Answer. I think that this is general enough to be worthy of a Post.

This application generates all maximal paths in a graph that begin with a given vertex. (I'm calling a path maximal if it cannot be extended and remain a path.) This code requires Maple 2019 or later and 1D input. This works for both directed and undirected graphs. Weights, if present. are ignored.

restart:

AllMaximalPaths:= proc(G::GRAPHLN, v)
description 
    "All maximal paths of G starting at v by breadth-first search"
;
option `Author: Carl Love <carl.j.love@gmail.com> 2021-Mar-17`;
uses GT= GraphTheory;
local 
    P:= [rtable([v])], R:= rtable(1..0),
    VL:= GT:-Vertices(G), V:= table(VL=~ [$1..nops(VL)]),
    Departures:= {op}~(GT:-Departures(G))
;
    while nops(P) <> 0 do
        P:= [
            for local p in P do
                local New:= Departures[V[p[-1]]] minus {seq}(p);
                if New={} then R,= [seq](p); next fi;                
                (
                    for local u in New do 
                        local p1:= rtable(p); p1,= u
                    od
                )       
            od
        ]
    od;
    {seq}(R)  
end proc
:
#large example:
GT:= GraphTheory:
K9:= GT:-CompleteGraph(9):
Pa:= CodeTools:-Usage(AllMaximalPaths(K9,1)):
memory used=212.56MiB, alloc change=32.00MiB, 
cpu time=937.00ms, real time=804.00ms, gc time=312.50ms

nops(Pa);
                             40320
#fun example:
P:= GT:-SpecialGraphs:-PetersenGraph():
Pa:= CodeTools:-Usage(AllMaximalPaths(P,1)):
memory used=0.52MiB, alloc change=0 bytes, 
cpu time=0ns, real time=3.00ms, gc time=0ns

nops(Pa);
                               72

Pa[..9]; #sample paths
    {[1, 2, 3, 4, 10, 9, 8, 5], [1, 2, 3, 7, 8, 9, 10, 6], 
      [1, 2, 9, 8, 7, 3, 4, 5], [1, 2, 9, 10, 4, 3, 7, 6], 
      [1, 5, 4, 3, 7, 8, 9, 2], [1, 5, 4, 10, 9, 8, 7, 6], 
      [1, 5, 8, 7, 3, 4, 10, 6], [1, 5, 8, 9, 10, 4, 3, 2], 
      [1, 6, 7, 3, 4, 10, 9, 2]}

Notes on the procedure:

The two dynamic data structures are

  • P: a list of vectors of vertices. Each vector contains a path which we'll attempt to extend.
  • R: a vector of lists of vertices. Each list is a maximal path to be returned.

The static data structures are

  • V: a table mapping vertices (which may be named) to their index numbers.
  • Departures: a list of sets of vertices whose kth set is the possible next vertices from vertex number k.

On each iteration of the outer loop, P is completely reconstructed because each of its entries, a path p, is either determined to be maximal or it's extended. The set New is the vertices that can be appended to the (connected to vertex p[-1]). If New is empty, then p is maximal, and it gets moved to R


The following code constructs an array plot of all the maximal paths in the Petersen graph. I can't post the array plot, but you can see it in the attached worksheet: BreadthFirst.mw

#Do an array plot of each path embedded in the graph:
n:= nops(Pa):
c:= 9: 
plots:-display(
    (PA:= rtable(
        (1..ceil(n/c), 1..c),
        (i,j)-> 
            if (local k:= (i-1)*ceil(n/c) + j) > n then 
                plot(axes= none)
            else 
                GT:-DrawGraph(
                    GT:-HighlightTrail(P, Pa[k], inplace= false), 
                    stylesheet= "legacy", title= typeset(Pa[k])
                )
            fi
    )),
    titlefont= [Times, Bold, 12]
);

#And recast that as an animation so that I can post it:
plots:-display(
    [seq](`$`~(plots:-display~(PA), 5)),
    insequence
); 

 

Hello there, 

Would you allow me to ask this (perhaps simple) question?

My goal is to express an equation as 'desired', but with no success with algsubs()/subs()/simplify(). 

Would you please show me the correct way?

 

restart:

PowerBalanceEq := 0 = e1(t) * i1(t) + e2(t) * i2(t) + e3(t) * i3(t);

0 = e1(t)*i1(t)+e2(t)*i2(t)+e3(t)*i3(t)

(1)

eq_i1 := i1(t) = solve(PowerBalanceEq, i1(t));

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(2)

n21eq := n21 = e2(t) / e1(t);

n21 = e2(t)/e1(t)

(3)

eq_i2 := algsubs(n21eq, eq_i1);

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(4)

eq_i3 := subs(n21eq, eq_i1);

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(5)

eq_i4 := simplify(eq_i1, {e2(t) / e1(t) = n21});

i1(t) = (-i2(t)*n21*e1(t)-e3(t)*i3(t))/e1(t)

(6)

desired := i1(t) = -n21*i2(t) - e3(t)*i3(t)/e1(t);

i1(t) = -n21*i2(t)-e3(t)*i3(t)/e1(t)

(7)

 


Best Regards, 

In Kwon Park 

Download Q20210316.mw

Is there a means of getting Maple to detect and print the operating system which it is being run on? Searching for this topic is awkward as it returns page after page of troubleshooting guides on how to get Maple running on different operating systems.

Conventionally in Bash I would use something like: echo $(uname)

PLs, correct my code about how to find the derivative by using the loop concept in maple?

help_derivative_in_loop.mw

Can anyone look at this worksheet, and explain why maple seems to complicate an easily evaluated integral?

 

 

 

Hyper.mw

 


 

 

Hi, I am trying to integrate a lengthy-expression but maple does not give a result and got hanged even after waiting 1 hour and more, pls help me to handle this or is this any other way to get a result?

Help_of_Integration.mw

First 8 9 10 11 12 13 14 Last Page 10 of 46