Maple 2019 Questions and Posts

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

I have some trouble solving the pde of:
ut + u^2*ux = u, u(x,0) = x, with x::real and t>0.

I think that I have 2 problems.

1.
The first part of the code I define u(x,t) with both the variable rp.
Then I define the variable q copying the definition of u(x,t).
When I try to insert q and u(x,t) in the initial equation - one is able to be reduced to one term while the other isn't.
So I'm not really sure what is happening here.

2.
When I use Maple's pdsolve() I get a result, but when I insert the answer in the initial equation - then it isn't correct.
I tried to show this in the last part of the code.

 

 

 

# ut + u^2*ux = u, u(x,0) = x

restart

rp := (-1 + sqrt(1 + 4*exp(t)^2*t*x))/(2*exp(t)^2*t);

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/((exp(t))^2*t)

(1)

u := (x,t) -> rp*exp(t):
'u(x,t)' = u(x,t);

u(x, t) = (1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(2)

q := (-1 + sqrt(1 + 4*exp(t)^2*t*x))/(2*exp(t)*t); # Copying the result from above and defining q the same

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(3)

# Now doing the same operations on supposedly the same term, but one is able to be reduced with assumptions while the other isn't.

L_nothing := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) ;
L_real := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming x::real;
L_t := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0;
L_all := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0, x::real;

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)

 

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)

(4)

L_nothing := diff(q,t) + q^2*diff(q,x) ;
L_real := diff(q,t) + q^2*diff(q,x) assuming x::real;
L_t := diff(q,t) + q^2*diff(q,x) assuming t>0;
L_all := diff(q,t) + q^2*diff(q,x) assuming t>0, x::real;

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

 

(1/4)*(8*(exp(t))^2*t*x+4*(exp(t))^2*x)/((1+4*(exp(t))^2*t*x)^(1/2)*exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t)-(1/2)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))/(exp(t)*t^2)+(1/4)*(-1+(1+4*(exp(t))^2*t*x)^(1/2))^2/(exp(t)*t^2*(1+4*(exp(t))^2*t*x)^(1/2))

(5)

restart

pde := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) = u(x,t);
ic := u(x,0) = x;

diff(u(x, t), t)+u(x, t)^2*(diff(u(x, t), x)) = u(x, t)

 

u(x, 0) = x

(6)

pdsolve([pde, ic]);

u(x, t) = exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)

(7)

u := (x,t) -> exp(t)*(sqrt(2*exp(2*t)*x - 2*x + 1) - 1)/(exp(2*t) - 1);

proc (x, t) options operator, arrow; exp(t)*(sqrt(2*exp(2*t)*x-2*x+1)-1)/(exp(2*t)-1) end proc

(8)

L := diff(u(x,t),t) + u(x,t)^2*diff(u(x,t),x) assuming t>0, x::real;

exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)+2*exp(t)*exp(2*t)*x/((2*exp(2*t)*x-2*x+1)^(1/2)*(exp(2*t)-1))-2*exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)*exp(2*t)/(exp(2*t)-1)^2+(1/2)*(exp(t))^3*((2*exp(2*t)*x-2*x+1)^(1/2)-1)^2*(2*exp(2*t)-2)/((exp(2*t)-1)^3*(2*exp(2*t)*x-2*x+1)^(1/2))

(9)

LL := simplify(L) = u(x,t)

exp(t)*(2*exp(2*t)*x-(2*exp(2*t)*x-2*x+1)^(1/2)-2*x+1)/((2*exp(2*t)*x-2*x+1)^(1/2)*(exp(2*t)-1)) = exp(t)*((2*exp(2*t)*x-2*x+1)^(1/2)-1)/(exp(2*t)-1)

(10)

evalb(LL)

false

(11)

# Obviously not correct solution... or what?

``

 

 

Download asol1-1.mw

 

 

I just  found what seems to be a serious problem and I am not able to figure if it is related to my own installation or not.

After I installed Physics 426 (Published on Sept 17, 2019) using the Maple GUI install button (which now works for my PC), I found I am not able to integrate basic things.

It seems to affect int when using some build in function with definite integration, but it could be others also. I need to test more. 

Could someone see if they get same problem as well?  

Could also someone please remind me of the library  commands to issue in order to remove current Physics version 426 and install earlier Physics version package, say 425, or any other version, so that  to see if this is related to version of a physics package or not?

restart;

version()

 User Interface: 1399874
         Kernel: 1399874
        Library: 1399874

1399874

interface(version)

`Standard Worksheet Interface, Maple 2019.1, Windows 10, May 21 2019 Build ID 1399874`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 426 and is the same as the version installed in this computer, created 2019, September 20, 23:28 hours, found in the directory C:\Users\me\maple\toolbox\2019\Physics Updates\lib\`

infolevel[int] := 3:

int(exp(x),x=0..1)

Definite Integration:   Integrating expression on x=0..1

Definite Integration:   Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, ftocms, meijerg, contour]
LookUp Integrator:   unable to find the specified integral in the table
int/elliptic: trying elliptic integration
Integration Warning:   Integration method ftoc encountered an error in IntegrationTools:-Definite:-Main:
 mismatched multiple assignment of 2 variables on the left side and 1 value on the right side

Definite Integration:   Returning integral unevaluated.

int(exp(x), x = 0 .. 1)

restart;

int(sin(n*x),x=0..Pi)

int(sin(n*x), x = 0 .. Pi)

int(tan(x),x=0..Pi)

int(tan(x), x = 0 .. Pi)

int(cos(x),x=0..1)

int(cos(x), x = 0 .. 1)

int(sin(x),x=0 .. Pi)

int(sin(x), x = 0 .. Pi)

int(cos(x),x)

sin(x)

int(x,x=0 .. 1)

1/2

 

Download int_not_working.mw

Why Maple 2019.1 gives an error when no initial conditions are given for the following heat PDE with periodic BC?

I am using Physics 426 (current version). On windows 10.

When adding ic as some arbitrary function f(x), then the error goes away. But no ic needs to be given to solve this PDE. The answer can be left using arbitrary constants in this case.

I also found that this seems to happen when the BC are periodic. When using the normal Dirichlet B.C. and omitting the initial conditions, the error went away.

Am I doing something wrong or is this a bug?

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2); #try with NO IC
bc:=u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
pdsolve([pde,bc],u(x,t))

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

Error, (in pdsolve/BC/2nd_order/Series/TwoBC) invalid boolean expression: NULL

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2)-u(x,t); #now try with IC
bc:=u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
ic:=u(x,0)=f(x);
pdsolve([pde,bc,ic],u(x,t)); #solution is correct

 

diff(u(x, t), t) = diff(diff(u(x, t), x), x)-u(x, t)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

u(x, 0) = f(x)

u(x, t) = exp(-t)*_C7[0]+Sum(exp(-t*(n^2+1))*(sin(n*x)*_C1[n]+cos(n*x)*_C7[n]), n = 1 .. infinity)

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2); #now try with NO IC, but not periodic BC
bc:=u(0,t)=1,u(Pi,t)=0;
pdsolve([pde,bc],u(x,t)); #solution is correct

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

u(0, t) = 1, u(Pi, t) = 0

u(x, t) = ((Sum(sin(n*x)*exp(-n^2*t)*_C1(n), n = 1 .. infinity))*Pi+Pi-x)/Pi

 

 

Download problem_09_20_2019.mw

Hi,

I have this code to calculate taylor method but I do not know how to write the part about derivative of a function f  inside the loop for ??

restart;
f:=(t,y)->y-t^2+1:
eqn:=diff(y(t),t)=y(t)-t^2+1:
ex:=dsolve({eqn,y(0)=0.5},y(t)):
t[0]:=0:w[0]:=0.5:h:=0.2:ex[0]:=0.5:e[0]:=0:
for n from 1 to 10 do
t[n]:=n*h;ex[n]:=t[n]^2 + 2*t[n] + 1 - exp(t[n])/2;
w[n]:=w[n-1]+h*f(t[n-1],w[n-1])+((h^2/factorial(2))*(f(t[n-1],w[n-1])-2*t[n-1]));
e[n]:=abs(ex[n]-w[n]);
od:

printf(" i | t[i] |(Taylor)w[i] |(exact)y[i] |Error | \n ");for i from 0 to n-1 do
printf("%2.2f| %5.2f  | %5.6f| %5.6f  |  %5.6f | \n", i, t[i], w[i] ,ex[i],e[i]) ;
od;

Hi there! 

One of my favorite videogames is pokémon as you can probably guess from the title. As a player I always wanted to optimize my chances of obtaining the rarest and best pokémon in the game. I have been working on an application that aims to use graph theory to analyze the game Pokémon Blue. The application explores the following questions:

Which is the rarest pokémon in the game?
Where can I find an specific pokémon and with what probabilities?
What is the place with most different species of wild pokémon?

I also included algorithms for the following: Given a certain desired team

  • Find the minimum amount of places to visit to catch them and return the list of the places the player will need to visit.
  • What are the routes with best probabilities to catch each pokémon from my desired team?

Check out my application at: https://www.maplesoft.com/applications/view.aspx?SID=154565.

The following are some of the results obtained in the app:

What is the most common pokémon?

I did not only considered the amount of places a pokémon can appear in but also the probabilities of it appearing in each place.

What are the connections between pokémon and places?

In my graph, I connected a pokémon and a place if such pokémon could be caught in that place. The following is an example for the pokémon Pidgey. The weights of the edges are the probabilities of finding Pidgey in each route.

Viceversa, I did the same for how a route is connected to the pokémons in it:

 

Map of the Game
I also generated a colour coded version for the map of the game: where blue means that the place is a water route, brown means it's a cave and green means it's a tall-grass route.
It's amazing what Maple's graph theory toolbox can do.

My problem is as following:
Our school has a requirement that we have to show the numeric values, when we calculate. And i was wondering if there's an easy way to do it?

Example of how i would normally do it:
A:=5
B:=5

C:=A+B = 10. 

What they want:
A:=5
B:=5

C:=A+B = 5+5=10

Does anyone have an easy way of doing this? Because in an exam I wont have the time to plug in the values myself.

Hey, I have been using maple for a whole 30 minutes, and have no idea what I am doing! I have some code set up to run the Eulers approximation to solve an ODE.

The code seems to run fine, but in the final output where it should give a number value, I am getting 6+0.10f (where f is a variable define beforehand). My friend who has run the same code does not run into this problem.

The Maple software is a on a public school computer, so maybe the specific one I am using has some setting set up that are not default?

Does anyone know what is going on? In the end I would like the output to be a decimal number. 

 

Reference image: https://imgur.com/a/A4DZuik

Hi, I have the following simple differential equation. 

2x dx -9y^2 dy = 0

How can I enter the command to solve it? I know I'm supposed to use dsolve command, but I keep getting an input error saying that it expected an ODE. Google says that said message is because for whatever reason Maple cannot understand dx or dy, and that instead I need to use diff command. But when I enter: 

2x diff(x) - 9 y^2 diff(y) = 0

I get another error. I have tried other combinations, but at times I get errors like y(x) and y cannot both appear in the given ODE, which I don't understand why they can't as they are like basic run of the mill ODEs, so I'm a bit confused. 

I have also checked Maple's docs but they don't help either, I tried the first example given here: 
https://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve
 and I got the same "expecting an ODE or a set or list of ODEs" as in my own examples, so I'm guessing the docs are assuming steps or some configuration. 

 

How am I supposed to enter the command? Thanks in advance!

Hello,

I want to evaluate the change of temperature and energy loss during the flow through an expansion valve.

But the command fsolve this does not work with CoolProp.

The following command is just repeated, but gives no result.

fsolve({ThermophysicalData:-Property("D", "H2", "temperature" = TTT, "pressure" = ppp) = 31.13, ThermophysicalData:-Property("H", "H2", "temperature" = TTT, "pressure" = ppp) = 4.098640000*10^6}, {TTT, ppp})

Regards,

Andreas

Some years ago it was promised that expansion of capabilities of Heun functions was imminent, but nothing has appeared.  Other functions long overdue for inclusion as special functions in Maple are the Lame functions, which arise as special cases of Heun's differential equation and therefore of Heun functions.  Lame's differential equation appears in Abramowitz and Stegun, but has long been neglected in Maple.  These spectial functions are much more generally useful to users of Maple than, for instance, esoteric parts of the physics package. 

Is this documented somewhere?  Why Maple do not return 0 from odetest after expanding the solution?

update: added additional tries to simplify it to zero as suggested but they do not give zero.

ode:=2*x^(1/2)*diff(y(x),x) = (1-y(x)^2)^(1/2);
sol:=dsolve(ode);

2*x^(1/2)*(diff(y(x), x)) = (1-y(x)^2)^(1/2)

y(x) = sin(x^(1/2)+(1/2)*_C1)

odetest(sol,ode);

0

res:=odetest(expand(sol),ode);

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,symbolic)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

expand(res)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res))

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),symbolic)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),trig)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),size)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

 

 

Download odetest_q.mw

Hi, I ran the following command: 

int(x^2 * sqrt(1-x^2), x)

and I got a solution. Then I try IntTutor: 

IntTutor(x^2 * sqrt(1-x^2), x)

And a UI window popus, does nothing. When I click "All Steps" it says "Unable to solve this problem". How so, if int() just gave me an answer? Or am I using the commands wrong?

I'm trying to see the steps by step solution of the integral, so I can compare it with my attempts. Kinda like what http://integral-calculator.com/ does. Thanks in advance. 

Hello

 

As title says, when I enter equation in math mode and switch to text mode and hit "enter" to go to the next line then it gets executed, usually in former versions it didnt execute and was much faster for me to use the program this way.

How do I fix this? I don't want to use shift-F5 all the time to make the text unexecutable, I would like it to be like in the old version prior to 2019.

Now it does this which is really annoying, I dont want it to execute when changing line!

Best regards

Jonas

i literally cant figure out how to pay money for this

I'm using dsolve command to solve a differential equation. Using infolevel to 3 will tell me the classification of said DE. However, how can I see the step by step solution? I'm using Maple as a study tool so I do solve manually a DE then I'd like to compare my answer with Maple's. How can I acomplish this? Thanks in advance. 

3 4 5 6 7 8 9 Last Page 5 of 16