MaplePrimes Questions

Hi

I have trouble with solving this ODE system using dsolve command:

and 

 

This system have following solutions:

where

and

C's and A are constants of integration.

 

They're equations from this paper https://arxiv.org/abs/1710.01910 (45 and 47). 
               

However, my solution differs from correct one - in output there are hypergeometric functions everywhere.

Is there any way to fix/convert this solution? Or to get rid of these functions (my f1 solution looks very close to original one but with coupled hypergeometric function). 
 

`` ``

``

``

 

``

sysode := 2*q*(3*q-1)*f1(tau)/tau^2+2*q*(diff(f1(tau), tau))/tau+diff(f1(tau), tau, tau)+(kappa^2+f2(tau))*(1+omega)*(tau/t0)^(-(3*(3+omega))*q) = 0, (54*q^3-30*q^2+4*q)*f1(tau)/tau^3+(24*q^2-4*q)*(diff(f1(tau), tau))/tau^2+11*q*(diff(f1(tau), tau, tau))/tau+diff(f1(tau), tau, tau, tau)-3*omega*(1+omega)*(kappa^2+f2(tau))*q*(tau/t0)^(-(3*(1+omega))*q)/tau = 0;

2*q*(3*q-1)*f1(tau)/tau^2+2*q*(diff(f1(tau), tau))/tau+diff(diff(f1(tau), tau), tau)+(kappa^2+f2(tau))*(1+omega)*(tau/t0)^(-3*(3+omega)*q) = 0, (54*q^3-30*q^2+4*q)*f1(tau)/tau^3+(24*q^2-4*q)*(diff(f1(tau), tau))/tau^2+11*q*(diff(diff(f1(tau), tau), tau))/tau+diff(diff(diff(f1(tau), tau), tau), tau)-3*omega*(1+omega)*(kappa^2+f2(tau))*q*(tau/t0)^(-3*(1+omega)*q)/tau = 0

(1)

``

``

simplify(dsolve([sysode], build));

{f1(tau) = _C1*tau^(-q+1/2-(1/2)*(-20*q^2+4*q+1)^(1/2))+_C2*tau^(-q+1/2+(1/2)*(-20*q^2+4*q+1)^(1/2))+_C3*tau^(-9*q+2)*hypergeom([-(1/12)*(16*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-16*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega), f2(tau) = (-695520*(q^2+(11/21)*q+2/21)*(tau/t0)^(3*q*(omega+5))*_C3*(q-3/10)*omega*q*(q^2-(25/69)*q+2/69)*tau^(-9*q)*hypergeom([-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(-8*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)-89424*(q^2*(tau/t0)^(3*q*(omega+7))*omega^2*tau^(-9*q)*_C3*(q^2-(25/69)*q+2/69)*hypergeom([-(1/12)*(-8*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(-20*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(20*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)+(7/3)*(q^2+(11/21)*q+2/21)*(hypergeom([-(1/12)*(16*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-16*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)*_C3*(tau/t0)^(3*(3+omega)*q)*(q^2-(25/69)*q+2/69)*tau^(-9*q)+(1/69)*kappa^2*(1+omega)))*(q^2-(7/9)*q+2/9))/((1+omega)*(4*q-(-20*q^2+4*q+1)^(1/2)-3)*(8*q-(-20*q^2+4*q+1)^(1/2)+3)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)*(4*q+(-20*q^2+4*q+1)^(1/2)-3))}

(2)

NULL

NULL

``

NULLNULL

NULL

NULL

NULL

NULL

``


 

Download question.mw

When I apply the uses function with the Physics package in a procedure, the commands in this package are not restricted to the inside of the procedure, but are applied globally. See the example below:

gds := proc(LL, qi, t)

 local ta,i;  

uses Physics;

ta := sec(diff(diff(LL, diff(qi[i](t), t)), t), i = 1 .. nops(qi));

RETURN(ta) end:

sxy := diff(x(t), t)^2 + diff(y(t), t)^2:

gds(sxy, [x, y], t);

Error, (in Physics:-diff) name expected for external function
 

On the other hand, when I apply the uses function with the LinearAlgebra package in a procedure, the commands in this package are restricted to the inside of the procedure only.
dst:=proc(MM) 

local DA; 

uses LinearAlgebra;

DA:=Determinant(MM); 

RETURN(DA) end:

dst(<<1 | 2>, <3 | 4>>);

                  -2

Determinant(<<1 | 2>, <3 | 4>>);

                         Determinant(Matrix(2, 2, [[1, 2], [3, 4]]))

This could be a bug in Maple 2019?

Hello, I am wondering if Maple is capable of generating a subgraph for a directed, weighed graph with the GraphTheory package. The online resources I can find only include undirected, unweighed graphs. 

can you please include an example with commands that is able to perform the said task?

hi everyone:

how can I solve this below equation?

w:=(x)->sin(lambda*x)+b*cos(lambda*x)-sinh(lambda*x)-b*cosh(lambda*x);

b := -(sin(lambda*L)+sinh*lambda*L)/(cos(lambda*L)+cosh*lambda*L);

L:=10;

equation:=int(w(x)^2,x=0..L)=1;

lambda=????

tnx..

Hi everybody?

how can I solve this PDE with Runge-Kutta method and 2D plot in terms of w(x,t) , t and 3D plot in terms of t, x, w(x,t)?

code1.mw

how this integral can be calculated in the simplest form ? the second question is what exactly is done when using assuming? for example when using assuming real, all the functions or parameteres are affected? thanks in advanced

 

restart:with(IntegrationTools):

(int(int(exp(-(y-beta[0]-beta[1]*x-b0-b1*x)^2/(2*sigma^2))*exp(-b0)*exp(-b1),b0=0..infinity),b1=0..infinity,continuous=true) assuming real)

signum(limit(-(1/2)*Pi^(1/2)*exp((1/2)*(2*b1+2*beta[1])*x+(1/2)*sigma^2-y-b1+beta[0])*2^(1/2)*sigma*(erf((1/2)*(sigma^2+(b1+beta[1])*x-y+beta[0])*2^(1/2)/sigma)-signum(sigma)), b1 = infinity))*infinity

(1)

 


 

Download error_function.mw

I know you can call python from Maple, I am thinking if there is the other way around. That is use Maple (and its toolbox) as backend engine to do calculations (e.g. Global Optimization), and say manipulate the data in Python as the front-end.

This is an ode from text book.  The little tricky part on this is the right hand has abs on the dependent variable, otherwise it is trivial.

restart;
ode:=diff(y(x),x) = abs(y(x))+1;
sol:=dsolve(ode,y(x))

Gives

I am not able to get odetest to give zero on either of the two solutions.  

odetest(sol[1],ode);
odetest(sol[2],ode);

None give zero. I tried assumptions on x>0, x<0 and tried simplify(...,symbolic), nothing gives zero.

Now the book gives the solutions without constant of integration, which is strange. This is what the book gives as solution

                 y(x) = exp(x)-1   x>=0
                 y(x) = 1-exp(-x) x<0

Which is the same as Maple's solution, but without the constant of integration! So when I removed _C1 from both solutions and added the assumptions on x, then I got zero

odetest(subs(_C1=1,sol[1]),ode) assuming x<0;
                      0

odetest(subs(_C1=1,sol[2]),ode) assuming x>=0
                      0

I solved this by hand, and got same solution as Maple actually (may be I made the same mistake as Maple? :) 

But the above shows these solution are not correct? I do not now know what happend to the constant of integration in the book solution since it only shows final solution. It looks like book just used C=1 for the constant of integration. But Maple also thinks the book solution is correct.

fyi, the implicit solution by Maple does verify with no problem:

ode:=diff(y(x),x)=abs(y(x))+1;
sol:=dsolve(ode,y(x),'implicit');
odetest(sol,ode)

             0

Any one can shed some light what is going on? Is Maple solution correct? If so, why it does not verify? Should Maple have given the book solution?

this is problem 9, page 15, "Elementary differential equations" by William F. Trench, 2001

Maple 2019.1

The following differential equation:

sy := (dsolve({T*diff(y(x), x, x) + rho*omega^2*y(x) = 0, y(0) = 0, y(L) = 0}, y(x)) assuming (0 < T, 0 < omega, 0 < rho))

                                                                 sy:=y(x)=0

Maple only returns the trivial solution. Should return other expressions:
Thank you

Hello,

My question is mathematical in nature, so it might be a little out of place but I though I would give it a shot. 

You have a series of chebyshev coefficients in two connecting subdomains lets say S1 = [0,0.5] and S2=[0.5,1]. So far you are still in the spectral space. If you want to compute the solution in real space you can sum the coefficients with the Chebyshev polynomials. 

Now imagine you change the interval to S1 = [0,0.6] and S2 = [0.6,1]. Is there a way to manipulate the Chebyshev coefficients from both initial subdomains to create a new set of Chebyshev coefficients that fit the solution in the new subdomains. 

The brute force method would be to create the real solution of Chebyshev polynomials and then use that to form a new set of Chebyshev coefficients. Or you can use Clenshaw to compute the solution at several points, and then use the points to create new Chebyshev coefficients.

But what if we can stay in spectral space and create the new chebyshev coefficients. Is that possible? If so, how?

step := t −> piecewise(t sum( (−1)∧n * step(t−n) , n=0..50);

Consider the following forced D.E. L d 2x dt2 + R dx dt + 1 C x = 200 ∗ f(t/3)

where R = 20 , C = 0.01 , L = 10 , x(0) = 10 , x 0 (0) = 0.

a. Graph the solution curve in the phase plane on Maple.

b. Graph x(t) over the interval 0 ≤ t ≤ 25 on Maple .

 

 

For the DE solution below, Maple returns only one option. I can't get the others. Can anyone help?

wW := unapply(piecewise(0 <= x and x < L/2, 0, L/2 <= x and x <= L, w[0]), x):

eq := k*diff(y(x), x$4) = wW(x):

dsolve({eq, y(0) = 0, y'(0) = 0, y''(L) = 0, y'''(L)=0}, y(x)) assuming 0 < L

          y(x) = -L*w[0]*x^3/(6*k) + L^2*w[0]*x^2/(4*k) + w[0]*x^4/(24*k)

Obrigado.
Oliveira

Hello interested parties!

I wish to measure the distance between points in the Cartesian plane and then export the results to Excel using a data frame routine. For the sake of example: suppose there are 2 points, A and B and 6 more points, a,b,c,d,e and f whose coordinates are known.

I am interested in measuring the distance from A to a, b, c, d, e, f and from B to a, b, c, d, e, f. So, a matrix is constructed (see attached) giving the linear separation between eack of the 8 points ... and that's ok. 

However, instead of six points of interest, suppose that the number of points becomes very large (e.g. 1,000) and I still need to export to Excel.

Does anyone know of an efficient routine that produces a rectangular matrix to produce a 2 x 6 data frame so that, in the case of large-scale problems the data frame is not overburdened?

Thanks for reading and thanks in advance for any suggestions.

Mapleprimes_Matrix.mw

given an expression such as expr:=-1/2*x*(y^2-1) which in tree form will be

I can get -1/2 using op(1,expr).   I need command to return the "rest" of the right side of the tree, all of it, not matter how big.

I tried op(2..nops(expr),expr) and that returns x, y^2 - 1 

Is there a way to return directly x*(y^2-1)*etc....  so I do not have to play around with the above expression sequence?  Another option is to type

           expr/op(1,expr)

to get the right side of the tree. But this seems like a hack. Do not like to divide. worry about zero.

The same thing if the type was `+`, I want to get  the whole right side in one command.

Again, I can do  expr-op(1,expr) to get the whole right side. But this also seems like  a hack, altought not as bad as with  the case above

Any hints on how to best do these things?

Maple 2019.1

 

 

 

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