MaplePrimes Questions

I solve a system of equations, and am having difficulty 1) understanding what I"m seeing, 2) using the results.
 

Download substitution_help.mw

 

At (21), I get the solution to the system of equations.  I then want to use substitute a value for xC1 that supports the solution, and plug it into the other variables that are solved in terms of it.  However, I can't figure out how to do this.  I keep getting errors like:

Error, invalid input: eval expects its 2nd argument, eqns, to be of type {integer, equation, set(equation)}, but received {Rsrc = .9640102828*xC1^2+0.2570694087e-2*(140625.*xC1^4-151321.*xC1^2)^(1/2), xC2 = -0.1333333333e-2*(281250.*xC1^3+750.*xC1*(140625.*xC1^4-151321.*xC1^2)^(1/2)+51018750.*xC1^2+136050.*(140625.*xC1^4-151321.*xC1^2)^(1/2)-151321.*xC1)/(375.*xC1^2+(140625.*xC1^4-151321.*xC1^2)^(1/2)), xC1 <= -363.3194071}

please see attached file.

I assume I'm getting 2 solutions.  I'm picking the first one and trying to then solve for the other variables once I pick a value for xC1.

 

Thank you,

substitution_help.mw

Hello,

 

I have a complex transfer function.  I've defined everyting as "real" via:

assum := Rsrc::real, C1::real, Lp::real, C2::real, f::real, RL::real, 0 < Rsrc, 0 < C1, 0 < Lp, 0 < C2, 0 < RL, 0 < f

I'm expecting simplify to reduce the following transfer function so that the denominator is real, but I can't get it to do it:


I have every variable defined as real, so I am not sure why it won't simplify this expression.

 

Thank you

 

 

Dear Users! Hope everything fine here. For any vales of M and N I generated the system of equation.

for j from 2 while j <= N do
for i while i <= M do

omega[2]*(2-b[1])*u[i, j]+(2*b[1]*omega[2]-b[2]*omega[2]-omega[2]+1)*u[i, j-1]-omega[2]*(sum((b[l+2]-2*b[l+1]+b[l])*u[i, j-l-1], l = 1 .. j-2))
end do end do

But I want to convert it into matrix for example if N = 3 and M = 4, I need the following form

I am waiting for your response.

Hello everyone !,


I would like to generate two random complex vectors (x1 and x2) several time and I want to check how these two vectors (j iteration) close to their previous values (j-1 iteration): abs (x1(j)-x1(j-1)) < 10^-4 and abs (x2(j)-x2(j-1)) < 10^-4. Therefore, I want that my program stop when this criteria is satisfied for x1 and x2 simultaneously.

I know how to check that for one element of the vector but not all the elements of the vector.
code:
Comp.vect.mw

Hi!

I see that from Maple 2018 there is a command to compute the so called Radial Basis Function Interpolation:

https://www.maplesoft.com/support/help/Maple/view.aspx?path=Interpolation%2FRadialBasisFunctionInterpolation

I am trying to implement that code in Maple 2015, but it returns the error

Error, (in h) bad index into Vector

Displaying the vectors computed with the procedure, they seem correct, but the function that I want to return seems to fail (it is a summatory).

Attached the maple file

RBF_Interpolation.mw

I will appreciate any suggestion. Many thanks in advance for your comments!

BR,

GGM

 How to insert legends in the surfdata?

plots:-surfdata({Mat1}, ll1 .. ul1, ll2 .. ul2, dimension = 2, colorscheme = ["Blue", "Green", "Yellow", "Red"], axes = boxed, axesfont = [TIMES, BOLD, 16], axis = [thickness = 2], labelfont = [TIMES, BOLD, 16], labels = ["R", "Ma"])

 

 

 

 

Now I have a Matrix say  

 

Now I have another matrix say 

Now my second matrix has to be appended below the previous matrix the number of coulmns will the same in each case.

Again if create a new matrix I will ask it to append below the already appended new matrix and so on 

 

and lastly I want to export the matrix to excel.

 

 

If someone can help your work will be 100% acknowledged

 

I alpologize for any inconvince caused kind help

Dear, I am a newby using Maple and encounter following issue: when I multiply a vector with 2 elements and units [m] with e.g. 6 [m] using the *~ for an element by element multiplication this works as it should. However, when I try to multiply a vector with 2 elements and units [mA] and multiply this in the same way as above with 14 [V] I get as answer 2 results with a correct multiplication but followed by V mA. First I would expect [W] as unit but the V mA in the result vector are apparently no units. What am I doing wrong?

Thank you for any help.

PlaneDual returns the plane dual of a planar graph G, that is, a graph with faces of G as its vertices in which two vertices are adjacent if and only if they share an edge as faces of G. Of course, this is a little different from the standard definition of plane dual. (Interlude: I estimate that the two definitions are equivalent in the case that the planar graph is 3-connected simple graph)

It's not hard to find a plane dual of a planar graph in Maple. 

g:=Graph({{1,2},{2,4},{3,4},{2,3},{1,3},{1,4},{4,5},{2,5},{1,5}});
DrawPlanar(g);

dual_g:=PlaneDual(g);
DrawPlanar(
dual_g)

Since all labels of the dual graph are used numbers 1..n in maple, I cannot see how its vertices correspond to the face of the original graph.  And further, I want to know one edge of the dual graph corresponds to which edge (should be the boundary on two faces) of the original planar graph.

Maybe input {1,4} of the dual graph and output {2,4} of the original graph.

For example, Input {1} that is a vertex of  dual graph  to get the original face {2,3,4} and if we input {1,4} of the dual graph, we will output edge {2,4} of the original graph.

I don't know if there's a good way to do that.

 

 

Hi! I was wondering about drawing phase plane for differential system with some conditions. For example how can we draw this for:

 

restart;
with(plots);
with(DEtools);

ode := piecewise(1 < abs(x(t)), diff(x(t), t $ 2) - 2 = 0, abs(x(t)) < 1, diff(x(t), t $ 2) = 0);
????????????

I wanted something similar to that:

DEplot({diff(x(t), t) = y(t), diff(y(t), t) = 8*x(t)*y(t)}, [x(t), y(t)], t = -2 .. 2, x = -1 .. 1, y = -4 .. 4);

or this:

ode1 := diff(x(t), t $ 2) + 2*diff(x(t), t) = 0

DEplot(ode1, x(t), t = -2 .. 10, [[x(1) = 0.2, D(x)(1) = -1.4]]);

Edit:

I rewrite that to make integral curves and this phase plot should look similar to this:


 

Hi! I know that length of blue line and red line equal: Pi/4 and Pi*sin(Pi/8)/4 so from spherical pythagorem theorem green line should equals cos(Pi/4)*cos(Pi*sin(Pi/8)/4) but when I calculate this from formula for length of parametric curve I got something like this (I have just emphasized):

restart;
with(plots);
assume(t, real);
K := plot3d(1, theta = 0 .. 2*Pi, phi = 0 .. Pi, coords = spherical);
S2 := display(spacecurve([cos(t)*sin(t + Pi/8), sin(t + Pi/8)*sin(t), cos(t + Pi/8)], t = 0 .. Pi/4, thickness = 3, color = green)):

int(sqrt(<diff(cos(t)*sin(t + Pi/8), t), diff(sin(t + Pi/8)*sin(t), t), diff(cos(t + Pi/8), t)> . <diff(cos(t)*sin(t + Pi/8), t), diff(sin(t + Pi/8)*sin(t), t), diff(cos(t + Pi/8), t)>), t = 0 .. Pi/4)

-sqrt(2 - sqrt(2))*sqrt(2 + sqrt(2))*sqrt(2)*EllipticE(I/2*sqrt(2 - sqrt(2)), I)*I/2 + sqrt(2 - sqrt(2))*sqrt(2 + sqrt(2))*sqrt(2)*EllipticF(I/2*sqrt(2 - sqrt(2)), I)*I + EllipticE(I/2*sqrt(2 + sqrt(2)), I)*I - 2*I*EllipticF(I/2*sqrt(2 + sqrt(2)), I)

evalf(%)

0.959458136 + 0.*I

evalf(cos(Pi/4)*cos(Pi*sin(Pi/8)/4))

0.6754080210

I am not sure is Maple calculation wrong or I have missed something important?

restart;
Here is my pde and a procedure that plots the solution.
K1:=proc(g)
uses PDEtools,plots:
local pde, ic,ans;
pde:=-4*x*diff(f(u,x),u,x)+4*diff(f(u,x),u)=x^4*diff(f(u,x),x,x)+x^3*diff(f(u,x),x)+8*x^2*f(u,x)*(1-f(u,x)^2);
ic:={f(u,0) = 1, f(u,1) = 0,f(0,x)=g};
ans:=pdsolve(pde,ic,numeric,compile=true,time=u,range=0..1,'spacestep'=0.005);
ans:-plot(u=3)
end proc:
K1(1+x^2-2*x^3);

It works just fine; I get a plot of f(u,x) for u =3.  (Note that unlike dsolve there is no complaint about the global variable g in the initial conditions.)
Now I want to see a plot of diff(f(u,x) for u=3.
K2:=proc(g)
uses PDEtools,plots:
local pde, ic,ans;
pde:=-4*x*diff(f(u,x),u,x)+4*diff(f(u,x),u)=x^4*diff(f(u,x),x,x)+x^3*diff(f(u,x),x)+8*x^2*f(u,x)*(1-f(u,x)^2);
ic:={f(u,0) = 1, f(u,1) = 0,f(0,x)=g};
ans:=pdsolve(pde,ic,numeric,compile=true,time=u,range=0..1,'spacestep'=0.005);
ans:-plot([diff(f(u,x),x,u),color=cyan],u=3)
end proc:
K2(1+x^2-2*x^3);

That does not work.

I try to introduce a new variable h(u,x) = diff(f(u,x),x) so that I can plot h(u,x).
K3:=proc(g)
uses PDEtools,plots:
local pde, ic,ans;
pde:={h(u,x)=diff(f(u,x),x),
-4*x*diff(h(u,x),u)+4*diff(f(u,x),u)=x^4*diff(h(u,x),x)+x^3*h(u,x)+8*x^2*f(u,x)*(1-f(u,x)^2)};
ic:={f(u,0) = 1,f(u,1) = 0,f(0,x)=g};
ans:=pdsolve(pde,ic,numeric,compile=true,time=u,range=0..1,'spacestep'=0.005);
ans:-plot(h(u,x),u=3)
end proc:

K3(1-x^2);
Error, (in pdsolve/numeric/par_hyp) Incorrect number of initial conditions, expected 2, got 1

I have no idea what Maple is referring to; there are 3 initial conditions, not 1 or 2.

Anybody know what is going on? Any idea how to get what I need?

One more comment. I have never knowingly used a module in all the years I have been using and teaching Maple. I am sure there are good reasons for the construct but I think it would be difficult to teach. For ode's the result of dsolve is a procedure and it is relatively easy to teach because procedures are the bread and butter of using Maple. Why does pdsolve return a module?  I spent a good deal of time figuring out the use of pdsolve and would not like to force my students to do the same. I get them up to speed solving ode's using dsolve and DETools in a one hour lab. I wonder how much time it would take to do pdsolve.

 

Hello there, 

Would you allow me to a question regarding the correct way of using 'alias?

In the attached worksheet, an alias is defined, then a. the defined alias is not working (please have a look at the line with the same comment), b. the alias works in the other way around (please have a look at the line with the corresponding comment, Alias is working backward). When I tried to substitute the function with the 'subs' command (please have a look at the expression 'Desired'), then I was able to get the result, expected from alias command. 

Perhaps, I am confused with how the 'alias' command works. I would appreciate it if the correct way is explained. 

Thank you, 

In Kwon Park 

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Q20210724.mw .
 

Download Q20210724.mw

 

Hello everyone,

I am presently carrying out some computation of which I intend to solve some equations and get the preceeding values. But it would appear that my maple software just keeps showing evaluating without actually producing any results for hours even days. Is this due to my low laptop specs? 

I would love if the community can take a look at the code, and possibly run it to see if it's ok. I have attached the code for reference. 

Thank you.

 


test.mw

 

Hi,

    here a problem when i solve equations.i guess solve lost a root.how can i do.


An_unexpected_solve_bug_.pdf
Download An_unexpected_solve_bug_.mw

First 267 268 269 270 271 272 273 Last Page 269 of 2308