Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello!

How do I solve this system? could someone help me please.

restart;
eqns := {x(t+1) = (1+10^(-6)*(0.4e-2-0.6e-2)/(0.1e-3))*x(t)+0.7e-1*10^(-6)*y(t),

y(t+1) = 0.6e-2*10^(-6)*x(t)/(0.1e-3)+(1-0.7e-1*10^(-6))*y(t)};

with:
x(0) = 1
y(0) =
y(0) = 857.1428571

restart

eqns := {x(t+1) = (1+10^(-6)*(0.4e-2-0.6e-2)/(0.1e-3))*x(t)+0.7e-1*10^(-6)*y(t), y(t+1) = 0.6e-2*10^(-6)*x(t)/(0.1e-3)+(1-0.7e-1*10^(-6))*y(t)};

{x(t+1) = .9999800000*x(t)+0.7000000000e-7*y(t), y(t+1) = 0.6000000000e-4*x(t)+.9999999300*y(t)}

(1)

x(0) = 1

x(0) = 1

(2)

y(0) = 0.6e-2/(0.1e-3*0.7e-1)

y(0) = 857.1428571

(3)

``

Download SystemRecursive.mw

Good day all.

My particular question concerns a Traveling Salesman-type problem.

Suppose I wish to move along the x-y plane and visit specific nodes (see the attached worksheet).

Starting at the origin, A, I intend to visit four locations, B to E, and finally return to the origin point. These nodes may be visited in any order - but, my total distance travelled must be a minimum.
However, my direction of travel is restricted; namely:

1. Movement is limited to the x and y-directions only (up and down as well as left and right)
2. Horizontal (left or right) movement is permitten only at y=1 and y=10

This second rule restricts me from turning left or right in between y= 1 and 10.
The Traveling Salesman routine (attached) is constructed to select a tour that is confined to orthogonal movement but it does not observe the second restriction (i.e. move left or right when you reach y=1 or y=10).

Is there any way in which I can build this condition into the routine so that the movement along the circuit observes the restrictions? 

If so - is it possible to graphically illustrate the order of travel (using arrows from point-to-point) on a point plot?

I appreciate you taking the time to read this.

MaplePrimes_May_6.mw

I tried to graph the function f(x)=x^(1/3) but it only gives me a graph for non-negative x's, when the function f has all real numbers as its domain.

Maybe I'm doing it wrong.

Thank you.

Hey I’m trying to shift a function horizontally to the right.

I have the following 3 functions:

V1 := -x

V2:= -2*x + 4.95

V3:= -x + 1.665

Function V2 I want to shift l_1 to the right, and V3 I want to shift l_1 + l_2 to the right.

I know I can do this manually by define the functions:

V2:= -2*(x-l_1) + 4.95

V3:= -(x-l_1-l_2) + 1.665

Where l_1:=1.665 and l_2:=4.95

Is there a way to do this without typing it manually?

By the way it’s only for plotting, so it’s not necessary for me to actually define them, if there is a way to do it within a plot some how.

Thank you in advance.

I am trying to solve these equation using fsolve, but it returns the same valve. Please provide a solution.\

Please see the attachment. 

Hi, with Units[Simple] package loaded, I tried to differentiate a few functions using D[n] but it does not work. problem.mw

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; exp(y*x) end proc

(1)

D[1](a)

proc (x, y) options operator, arrow; y*exp(y*x) end proc

(2)

D[2](a)

proc (x, y) options operator, arrow; x*exp(y*x) end proc

(3)

retart

retart

(4)

"with(Units[Simple]):"

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; Units:-Simple:-exp(Units:-Simple:-`*`(x, y)) end proc

(5)

D[1](a)

Error, (in tools/gensym) too many levels of recursion

 

D[2](a)

Error, (in tools/gensym) too many levels of recursion

 

NULL

Download problem.mw

Hi! I've got a set of subsets S with Abeing the i-subset. I need to sum up all the x's in all the Ai's. How can this be achieved?

(ex):

sum( { {a, b, c}, {a, b, d} } )= 2a+2b+c+d

Hey I’m trying to define the antiderivative for a function:

g(x) = 1

G(x) = int(g(x),x)

When I then type:

G(x) and press enter Maple gives me G(x) = x which of course is correct

But I can’t type:

G(5)

Then it gives me the error message:

Error, (in int) integration range or variable must be specified in the second argument, got 5

How to fix this?

I know I can type G(x) = x manually but I’m not interested in doing so, because in my document I’m going to have a lot of antiderivatives.

Thanks in advance.

I have a student who then she uses tools/assistent/import data and then the file then Maple claims the Excel file is empty? She uses Maple 2021.2. File works on other my and other student computers. 

I would like to perform the following expansion up to an arbitrary order. The dots refer to higher-order terms. All the coefficients are symmetric except for the first one.

Thank you very much!

To Maple support:

I was investigating this pde from a different forum.

I noticed that when using an expanded version of the pde, Maple hangs. Without expanding the PDE, Maple gives an answer in 2 seconds. 

Why does expanding the PDE makes a difference? I do not have an earlier version of Maple on my new PC to check if this is a new issue or not.
 

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;
pde1:=VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta]);
pde1_expanded:=expand(pde1);
bc  := u(1,theta)=sin(theta)^4,u(3,theta)=1;
pdsolve([pde1=0,bc],u(r,theta))
 

(diff(u(r, theta), r)+r*(diff(diff(u(r, theta), r), r))+(diff(diff(u(r, theta), theta), theta))/r)/r

(diff(u(r, theta), r))/r+diff(diff(u(r, theta), r), r)+(diff(diff(u(r, theta), theta), theta))/r^2

u(1, theta) = sin(theta)^4, u(3, theta) = 1

u(r, theta) = (1/52480)*((328*r^6-26568*r^2)*ln(3)*cos(2*theta)+(-r^8+6561)*ln(3)*cos(4*theta)+19680*(ln(3)+(5/3)*ln(r))*r^4)/(ln(3)*r^4)

pdsolve([pde1_expanded=0,bc],u(r,theta)); #HANGS, Waited more than 40 minutes.

 


 

Download hangs_pde.mw

DirectSearch finds nonexisting roots....     DirectSearch_finds_nonexisting_roots.mw

 

restart

plot([cos(x), 0.001*x*x],x=-40..40,y=0..2)     ### test function plot

 

eq:= cos(x)= 0.001*x*x;     ###   float

cos(x) = 0.1e-2*x^2

(1)

use RealDomain in solve(eq,x,explicit) end use   ## lacking some of the roots

-7.793210110, 7.793210110, -11.11953559, 11.11953559, -4.734809278, 4.734809278, -1.568336644, 1.568336644

(2)

use RealDomain in solve(eq,x) end use

-7.793210110, 7.793210110, -11.11953559, 11.11953559, -4.734809278, 4.734809278, -1.568336644, 1.568336644

(3)

fsolve(eq,x=-30)

-31.17938383

(4)

plot([cos(x), 0.001*x*x],x=-32..-31,y=0.9..1)

 

fsolve(eq,x=-32..-30);  fsolve(eq,x=-31.7..-31.4)

-31.17938383

 

-31.52634294

(5)

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(6)

eq;
SolveEquations(eq,AllSolutions):

cos(x) = 0.1e-2*x^2

(7)

interface(rtablesize=90);
SolveEquations(eq, AllSolutions)

90

 

Matrix(%id = 4800942722)

(8)

DirectSearch finds nonexisting roots!!!

Dr. Ali GÜZEL

 

Download DirectSearch_finds_nonexisting_roots.mw

Hello!

How do I get the plot of P(t) and C(t) and also a table with the values of P(t) for each t? Itried but I couldn't...

``

restart; beta := 0.7e-2; Lambda := 0.2e-4; `ρ__o` := 0.3e-2; lambda := 0.8e-1; h := 0.1e-1; n := 100

Error,

restart; beta := 0.7e-2; Lambda := 0.2e-4; `ρ__o` := 0.3e-2; lambda := 0.8e-1; h := 0.1e-1; n := 100

 

for i from 0 to n-1 do P[i+1] := (1+h*(`ρ__o`-beta)/Lambda)*P(i)+h*lambda*C(i); C[i+1] := h*beta*P(i)/Lambda+(-h*lambda+1)*C(i) end do:

seq(i, i = 0 .. 30); seq(P[i], i = 0 .. 30)

Error,

seq(i, i = 0 .. 30); seq(P[i], i = 0 .. 30)

 

with(plots); with(DEtools); p1 := plot([P(t)], t = 0 .. 100, [[P(0) = 1]], scene = [t, P(t)], thickness = 2, linecolor = red, stepsize = .1); p2 := plot([C(T)], t = 0 .. 100, [[C(0) = beta/(Lambda*lambda)]], scene = [t, C(t)], thickness = 2, linecolor = red, stepsize = .1); display([p1, p2])

``

Download System_Recursive_Equations.mw

Thank!!!

Dear all

How can I add more terms, in taylor approximation of odes. 

Attached the code well written for only second order approximatiom, how can i get the fourth order approximation in taylor expansion to approximate an IVP

taylor_fourth_order.mw

thank you

First 319 320 321 322 323 324 325 Last Page 321 of 2224