mmcdara

4505 Reputation

17 Badges

6 years, 290 days

MaplePrimes Activity


These are answers submitted by mmcdara

Let's note that 

u := (1 + 20230321)*x*y - (x^2 + y^2)/2

is an homogenous polynomial wrt x and y.
One can rewrite u by setting [x=lambda*cos(t), y=lambda*sin(t)] which gives 

v := collect(eval(u, [x=lambda*cos(t), y=lambda*sin(t)]), lambda);
    /                         1       2   1       2\       2
    |20230322 cos(t) sin(t) - - cos(t)  - - sin(t) | lambda 
    \                         2           2        /        

The maximum (maxima in reality) of v are obtained when lambda is equal to +/- infinity and when the t unction (op(1, v)) reaches its maxima:

v       := collect(eval(u, [x=lambda*cos(t), y=lambda*sin(t)]), lambda):
opt_t_1 := Optimization:-NLPSolve(op(1, v), t=0..Pi, maximize):
opt_t_2 := Optimization:-NLPSolve(op(1, v), t=Pi..2*Pi, maximize):

opt_x_1 := op(2, v) *~ eval([cos(t), sin(t)], opt_t_1[2]):
opt_x_2 := op(2, v) *~ eval([cos(t), sin(t)], opt_t_2[2]):

identify(evalf[8](opt_x_1));
identify(evalf[8](opt_x_2));

              [1  (1/2)       2  1  (1/2)       2]
              [- 2      lambda , - 2      lambda ]
              [2                 2               ]

            [  1  (1/2)       2    1  (1/2)       2]
            [- - 2      lambda , - - 2      lambda ]
            [  2                   2               ]

Then the maxima are rejected to x = +/- infinity and y = x.

Which s a far better result than Mathematica provides.

So, let me ask you this question (and @QM too): suppose your are part of a MMA users blog and MMA tells you that 

 {\[Infinity], {x -> Indeterminate, y -> Indeterminate}}

wouldn't you say that MMA doesn't give a completely satisfactory answer ?

I feel a sense of unfairness in the question and this two-man bashing of Maple, am I wrong? 

d1 is a centered divided difference approximation of diff(u, x$3) at "point" [i+1/2, j];not an approximation of the laplacian of u at [i, j]
 

restart

tau := (d, s) -> p -> p + s*~[2-d, d-1]

proc (d, s) options operator, arrow; proc (p) options operator, arrow; p+`~`[:-`*`](s, ` $`, [2-d, d-1]) end proc end proc

(1)

# examples

tau(1, h)([0, 0]), tau(1, -h)([0, 0]);
tau(2, k)([0, 0]), tau(2, -k)([0, 0]);

[h, 0], [-h, 0]

 

[0, k], [0, -k]

(2)

# forward and backward divided differences as approximations of diff(u(x, y), x)

fd_x := (u[op(tau(1, 1)([i, j]))] - u[op(tau(1, 0)([i, j]))]) / h;
bd_x := (u[op(tau(1, 0)([i, j]))] - u[op(tau(1, -1)([i, j]))]) / h;
 

(u[1+i, j]-u[i, j])/h

 

(u[i, j]-u[-1+i, j])/h

(3)

# approximation of diff(u(x, y), x$2) from fd and bd

d2_x := simplify((fd_x-bd_x)/h)

-(-u[1+i, j]+2*u[i, j]-u[-1+i, j])/h^2

(4)

# laplacian at point [i, j] 

fd_y := (u[op(tau(2, 1)([i, j]))] - u[op(tau(2, 0)([i, j]))]) / k;
bd_y := (u[op(tau(2, 0)([i, j]))] - u[op(tau(2, -1)([i, j]))]) / k;

d2_y := simplify((fd_y-bd_y)/k);

lap := simplify(d2_x+d2_y):
lap := collect(numer(lap), u[i, j]) / denom(lap)

(u[i, 1+j]-u[i, j])/k

 

(u[i, j]-u[i, -1+j])/k

 

-(-u[i, 1+j]+2*u[i, j]-u[i, -1+j])/k^2

 

((-2*h^2-2*k^2)*u[i, j]+h^2*u[i, -1+j]+h^2*u[i, 1+j]+k^2*u[-1+i, j]+k^2*u[1+i, j])/(h^2*k^2)

(5)

# approximation of diff(u(x, y), x$3) at point [i+1/2, j]


d3_x := simplify((eval(d2_x, i=i+1) - d2_x) / h)

(u[2+i, j]-3*u[1+i, j]+3*u[i, j]-u[-1+i, j])/h^3

(6)

 


Download DividedDifferences.mw


This code allows you to print your list in a way that is close to what you want.
Printed lines have arround n=10 characters.

Of course arrangements have to be done if some elements of the list are numbers with more than n digits.
More of that, the list is converted into a string before being parsed, which means that spaces and commas are included in the calculation of the string to plot.
But I think this can give you some hints to go further (for instance if you want to plot numbers, you must augment the the range to plot 1..pc[cut] by 2*p, where p is number of occurrences of a comma in newLs[1..pc[cut]].

 

restart:

SmartPrint := proc(L::list, n::posint)
local newLs, pc, cut:

newLs  := convert(L, string)[2..-2]:
pc     := [ StringTools:-SearchAll(",", newLs)]:
cut    := ListTools:-BinaryPlace(pc, n+1/2):

while length(newLs) > n do
  if pc[cut+1] = n+1 then
    cut := cut+1:
  end if:
  printf("%-20s (length = %d)\n", StringTools:-Trim(newLs[1..pc[cut]]), pc[cut]):
  newLs  := StringTools:-Trim(newLs[pc[cut]+1..-1]);
  pc     := [ StringTools:-SearchAll(",", newLs)];
  cut    := ListTools:-BinaryPlace(pc, n+1/2);
end do:

printf("%-20s (length = %d)\n", StringTools:-Trim(newLs), length(StringTools:-Trim(newLs))):
end proc:

L := [seq(i,i=1..20)]:
SmartPrint(L, 10)

1, 2, 3, 4,          (length = 11)
5, 6, 7, 8,          (length = 11)
9, 10, 11,           (length = 10)
12, 13, 14,          (length = 11)
15, 16, 17,          (length = 11)
18, 19, 20           (length = 10)

 

r := 1000*rand(0..1)*rand(0..1) + 100*rand(0..1)*rand(0..1) + 10*rand(0..10)*rand(0..1) + rand(0..10):
L := [seq(r(), i=1..20)];
SmartPrint(L, 10)

[60, 1100, 13, 1, 110, 66, 2, 2, 101, 1008, 28, 1038, 100, 3, 8, 33, 1161, 4, 50, 101]

 

60, 1100,            (length = 9)
13, 1, 110,          (length = 11)
66, 2, 2,            (length = 9)
101, 1008,           (length = 10)
28, 1038,            (length = 9)
100, 3, 8,           (length = 10)
33, 1161,            (length = 9)
4, 50, 101           (length = 10)

 

 


 

Download SmartPrint.mw

Unless I'm mistaken you miss one equation:

  • eq1 is of the form
     A*diff(h(r), r$4) + B*diff(h(r), r$4) + LowerOderTerms = 0

    A and B do not contain derivatives of h anq q of order 4

  • eq2 is of the form

     C*diff(h(r), r$3) + E*diff(h(r), r$3) + LowerOderTerms = 0

    C and E do not contain derivatives of h anq q of order larger than 2

  • Then plugging eq2 into eq1 produces a single ODE of the formeq1 is of the form

     P*diff(h(r), r$4) + Q*diff(h(r), r$4) + LowerOderTerms = 0

    where P and Q do not contain derivatives of h anq q of order larger than 3


So you miss one ODE.
The detailed explanation is given in the attached file.
A toy problem is also provided to help you understand why dsolve doesn't work asyou expected.
 

restart

eq1 := -8*Pi*((-(1/180)*(r*(diff(q(r), r))+2*q(r))*q(r)^2*(-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^2*(r^2*q(r)+h(r))^2*r^2*h(r)^2*(diff(h(r), r, r, r, r))+(1/180)*q(r)^2*(-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^2*(r^2*q(r)+h(r))^2*r^3*h(r)^2*(diff(h(r), r))*(diff(q(r), r, r, r, r))+(1/30)*q(r)*(-r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))*r*h(r)*(-5*r^2*h(r)*q(r)^2*(r*(diff(q(r), r))+2*q(r))*(r^2*q(r)+h(r))*(diff(h(r), r, r))*(1/3)+(2*r*q(r)*(diff(h(r), r))*(1/3)+h(r)*(r*(diff(q(r), r))+2*q(r)))*q(r)*(r^2*q(r)+h(r))*r^2*h(r)*(diff(q(r), r, r))+(1/12)*(7*(r*(diff(q(r), r))+2*q(r)))*q(r)^2*r^2*(r^2*q(r)+13*h(r)*(1/7))*(diff(h(r), r))^2+3*q(r)*r*(r^2*(r^2*q(r)-(1/3)*h(r))*(diff(q(r), r))^2+68*q(r)*(r^2*q(r)+5*h(r)*(1/17))*r*(diff(q(r), r))*(1/9)+52*r^2*q(r)^3*(1/9)+4*h(r)*q(r)^2*(1/9))*h(r)*(diff(h(r), r))*(1/4)-(1/3)*(4*(r*(diff(q(r), r))+2*q(r)))*(r^2*(r^2*q(r)+5*h(r)*(1/8))*(diff(q(r), r))^2+r*q(r)*(r^2*q(r)-(1/2)*h(r))*(diff(q(r), r))+5*r^2*q(r)^3*(1/2)+h(r)*q(r)^2)*h(r)^2)*(diff(h(r), r, r, r))-(1/18)*q(r)*(-r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(-2*q(r)*(3*r*q(r)*(diff(h(r), r))*(1/2)+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))*r*h(r)*(diff(h(r), r, r))*(1/5)+(r^2*h(r)^2*q(r)*(r^2*q(r)+h(r))*(diff(q(r), r, r))+7*q(r)^2*r^2*(r^2*q(r)+13*h(r)*(1/7))*(diff(h(r), r))^2*(1/20)+9*q(r)*r*h(r)*(r*(r^2*q(r)-(1/3)*h(r))*(diff(q(r), r))+34*q(r)*(r^2*q(r)+5*h(r)*(1/17))*(1/9))*(diff(h(r), r))*(1/20)-(1/5)*(4*(r^2*(r^2*q(r)+5*h(r)*(1/8))*(diff(q(r), r))^2-3*r*h(r)*q(r)*(diff(q(r), r))*(1/2)+7*r^2*q(r)^3*(1/2)+2*h(r)*q(r)^2))*h(r)^2)*(diff(h(r), r)))*(r^2*q(r)+h(r))*r^2*h(r)*(diff(q(r), r, r, r))-(1/12)*q(r)^4*h(r)^2*r^4*(r*(diff(q(r), r))+2*q(r))*(r^2*q(r)+h(r))^2*(diff(h(r), r, r))^3+(1/6)*q(r)^2*(r^2*q(r)+h(r))*r^2*h(r)*(q(r)*((1/2)*r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))*r^2*h(r)*(diff(q(r), r, r))+(1/20)*(7*(r*(diff(q(r), r))+2*q(r)))*q(r)^2*r^2*(r^2*q(r)+13*h(r)*(1/7))*(diff(h(r), r))^2+91*q(r)*(r^2*(r^2*q(r)+19*h(r)*(1/91))*(diff(q(r), r))^2+604*q(r)*(r^2*q(r)+79*h(r)*(1/151))*r*(diff(q(r), r))*(1/91)+484*r^2*q(r)^3*(1/91)+28*h(r)*q(r)^2*(1/13))*r*h(r)*(diff(h(r), r))*(1/120)-(1/120)*(133*(r*(diff(q(r), r))+2*q(r)))*h(r)^2*(r^2*(r^2*q(r)+97*h(r)*(1/133))*(diff(q(r), r))^2+52*q(r)*(r^2*q(r)-23*h(r)*(1/13))*r*(diff(q(r), r))*(1/133)+292*q(r)^2*(r^2*q(r)+37*h(r)*(1/73))*(1/133)))*(diff(h(r), r, r))^2-(1/12)*r*(q(r)^2*(2*r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))^2*r^3*h(r)^3*(diff(q(r), r, r))^2-8*q(r)*(-7*q(r)^3*r^3*(r^2*q(r)+13*h(r)*(1/7))*(diff(h(r), r))^3*(1/16)-85*q(r)^2*r^2*h(r)*(r*(r^2*q(r)+67*h(r)*(1/85))*(diff(q(r), r))+242*q(r)^2*r^2*(1/85)+206*q(r)*h(r)*(1/85))*(diff(h(r), r))^2*(1/48)+29*q(r)*(r^2*(r^2*q(r)+38*h(r)*(1/29))*(diff(q(r), r))^2-112*q(r)*r*(r^2*q(r)+19*h(r)*(1/28))*(diff(q(r), r))*(1/29)+20*q(r)^2*(r^2*q(r)+14*h(r)*(1/5))*(1/29))*r*h(r)^2*(diff(h(r), r))*(1/24)+(r*(diff(q(r), r))+2*q(r))*(r^2*(r^2*q(r)+5*h(r)*(1/8))*(diff(q(r), r))^2-3*r*h(r)*q(r)*(diff(q(r), r))*(1/2)+7*r^2*q(r)^3*(1/2)+2*h(r)*q(r)^2)*h(r)^3)*(r^2*q(r)+h(r))*r*h(r)*(diff(q(r), r, r))*(1/5)+(1/15)*(r*(diff(q(r), r))+2*q(r))*q(r)^4*r^3*(r^4*q(r)^2+8*r^2*h(r)*q(r)+31*h(r)^2*(1/4))*(diff(h(r), r))^4+q(r)^3*(r^2*(47*r^2*h(r)*q(r)*(1/30)+11*h(r)^2*(1/30)+r^4*q(r)^2)*(diff(q(r), r))^2+(34*q(r)^3*r^5*(1/5)+214*q(r)^2*h(r)*r^3*(1/15)+20*q(r)*h(r)^2*r*(1/3))*(diff(q(r), r))+27*r^4*q(r)^4*(1/5)+154*r^2*h(r)*q(r)^3*(1/15)+61*h(r)^2*q(r)^2*(1/15))*r^2*h(r)*(diff(h(r), r))^3-37*q(r)^2*r*h(r)^2*(r^3*(r^4*q(r)^2+107*r^2*h(r)*q(r)*(1/37)+61*h(r)^2*(1/37))*(diff(q(r), r))^3+(-118*q(r)^3*r^6*(1/37)+34*q(r)^2*h(r)*r^4*(1/37)+98*r^2*h(r)^2*q(r)*(1/37))*(diff(q(r), r))^2+(-478*r^5*q(r)^4*(1/37)-380*q(r)^3*h(r)*r^3*(1/37)-10*h(r)^2*r*q(r)^2*(1/37))*(diff(q(r), r))-44*q(r)^3*(r^4*q(r)^2-62*r^2*h(r)*q(r)*(1/11)-5*h(r)^2)*(1/37))*(diff(h(r), r))^2*(1/30)-4*q(r)*(r^4*(r^4*q(r)^2-3*r^2*h(r)*q(r)*(1/8)-9*h(r)^2*(1/8))*(diff(q(r), r))^4+(53*r^7*q(r)^3*(1/3)+58*q(r)^2*h(r)*r^5*(1/3)+11*q(r)*h(r)^2*r^3*(1/3))*(diff(q(r), r))^3+(57*r^6*q(r)^4*(1/2)+27*r^4*h(r)*q(r)^3*(1/2)-9*r^2*h(r)^2*q(r)^2)*(diff(q(r), r))^2+(52*r^5*q(r)^5+46*r^3*h(r)*q(r)^4+2*h(r)^2*q(r)^3*r)*(diff(q(r), r))+76*r^4*q(r)^6*(1/3)+56*r^2*h(r)*q(r)^5*(1/3)-8*q(r)^4*h(r)^2*(1/3))*h(r)^3*(diff(h(r), r))*(1/5)+(1/30)*(29*(r*(diff(q(r), r))+2*q(r)))*h(r)^4*(r^3*(r^4*q(r)^2+35*r^2*h(r)*q(r)*(1/29)+15*h(r)^2*(1/58))*(diff(q(r), r))^4+40*q(r)*(r^4*q(r)^2-4*r^2*h(r)*q(r)*(1/5)-3*h(r)^2*(1/2))*r^2*(diff(q(r), r))^3*(1/29)+264*q(r)^2*r*(r^4*q(r)^2+25*r^2*h(r)*q(r)*(1/22)+3*h(r)^2*(1/11))*(diff(q(r), r))^2*(1/29)+160*q(r)^3*(r^4*q(r)^2+(1/10)*r^2*h(r)*q(r)-3*h(r)^2*(1/5))*(diff(q(r), r))*(1/29)+200*q(r)^5*(r^2*q(r)+22*h(r)*(1/25))*r*(1/29)))*(diff(h(r), r, r))+(1/12)*(diff(h(r), r))*q(r)^2*h(r)^4*r^5*(r^2*q(r)+h(r))^2*(diff(q(r), r, r))^3-2*q(r)*(r^2*q(r)+h(r))*r^3*h(r)^2*(diff(h(r), r))*(-79*q(r)^2*r^2*(r^2*q(r)+115*h(r)*(1/79))*(diff(h(r), r))^2*(1/96)-17*q(r)*r*h(r)*(r*(r^2*q(r)-55*h(r)*(1/17))*(diff(q(r), r))+(1/17)*(274*(r^2*q(r)+65*h(r)*(1/137)))*q(r))*(diff(h(r), r))*(1/96)+(r^2*(r^2*q(r)+5*h(r)*(1/8))*(diff(q(r), r))^2-q(r)*(r^2*q(r)+5*h(r)*(1/2))*r*(diff(q(r), r))+21*q(r)^2*(r^2*q(r)+5*h(r)*(1/7))*(1/4))*h(r)^2)*(diff(q(r), r, r))^2*(1/15)+29*r*(diff(h(r), r))*(2*q(r)^4*r^4*(r^4*q(r)^2+8*r^2*h(r)*q(r)+31*h(r)^2*(1/4))*(diff(h(r), r))^4*(1/29)+30*q(r)^3*r^3*h(r)*(r*(47*r^2*h(r)*q(r)*(1/30)+11*h(r)^2*(1/30)+r^4*q(r)^2)*(diff(q(r), r))+17*r^4*q(r)^3*(1/5)+107*h(r)*q(r)^2*r^2*(1/15)+10*h(r)^2*q(r)*(1/3))*(diff(h(r), r))^3*(1/29)-37*q(r)^2*r^2*h(r)^2*(r^2*(r^4*q(r)^2+107*r^2*h(r)*q(r)*(1/37)+61*h(r)^2*(1/37))*(diff(q(r), r))^2-180*q(r)*r*(r^4*q(r)^2+22*r^2*h(r)*q(r)*(1/15)+2*h(r)^2*(1/3))*(diff(q(r), r))*(1/37)-58*q(r)^2*(r^4*q(r)^2-80*r^2*h(r)*q(r)*(1/29)-91*h(r)^2*(1/29))*(1/37))*(diff(h(r), r))^2*(1/29)-24*q(r)*r*h(r)^3*(r^3*(r^4*q(r)^2-3*r^2*h(r)*q(r)*(1/8)-9*h(r)^2*(1/8))*(diff(q(r), r))^3+(113*q(r)^3*r^6*(1/12)+145*q(r)^2*h(r)*r^4*(1/12)+25*r^2*h(r)^2*q(r)*(1/6))*(diff(q(r), r))^2+(83*r^5*q(r)^4*(1/12)-8*q(r)^3*h(r)*r^3*(1/3)-79*h(r)^2*r*q(r)^2*(1/12))*(diff(q(r), r))+145*r^4*q(r)^5*(1/6)+70*q(r)^4*h(r)*r^2*(1/3)+7*h(r)^2*q(r)^3*(1/6))*(diff(h(r), r))*(1/29)+(r^4*(r^4*q(r)^2+35*r^2*h(r)*q(r)*(1/29)+15*h(r)^2*(1/58))*(diff(q(r), r))^4-56*q(r)*(r^2*q(r)+5*h(r)*(1/2))*r^3*(r^2*q(r)+6*h(r)*(1/7))*(diff(q(r), r))^3*(1/29)+(408*r^6*q(r)^4*(1/29)+24*r^4*h(r)*q(r)^3+324*r^2*h(r)^2*q(r)^2*(1/29))*(diff(q(r), r))^2-128*q(r)^3*r*(r^4*q(r)^2+35*r^2*h(r)*q(r)*(1/8)+3*h(r)^2)*(diff(q(r), r))*(1/29)+440*q(r)^4*(r^4*q(r)^2+64*r^2*h(r)*q(r)*(1/55)+12*h(r)^2*(1/55))*(1/29))*h(r)^4)*(diff(q(r), r, r))*(1/360)-(1/2880)*q(r)^5*(diff(h(r), r))^7*r^5+(1/720)*(r*(diff(q(r), r))+2*q(r))*q(r)^4*r^4*(r^2*q(r)+17*h(r)*(1/4))*(diff(h(r), r))^6+(1/360)*q(r)^3*(r^2*(r^4*q(r)^2+8*r^2*h(r)*q(r)+3*h(r)^2*(1/2))*(diff(q(r), r))^2+(12*q(r)^3*r^5+96*q(r)^2*h(r)*r^3+68*q(r)*h(r)^2*r)*(diff(q(r), r))+8*r^4*q(r)^4+64*r^2*h(r)*q(r)^3+37*h(r)^2*q(r)^2)*r^3*(diff(h(r), r))^5+(1/90)*q(r)^2*(r^3*(r^4*q(r)^2-39*r^2*h(r)*q(r)*(1/8)-4*h(r)^2)*(diff(q(r), r))^3+(36*q(r)^3*r^6+71*q(r)^2*h(r)*r^4*(1/4)-13*r^2*h(r)^2*q(r))*(diff(q(r), r))^2+(195*r^5*q(r)^4*(1/2)+89*q(r)^3*h(r)*r^3-h(r)^2*r*q(r)^2)*(diff(q(r), r))+38*r^4*q(r)^5+8*q(r)^4*h(r)*r^2-21*h(r)^2*q(r)^3)*r^2*h(r)*(diff(h(r), r))^4-23*q(r)*(r^4*(r^4*q(r)^2-22*r^2*h(r)*q(r)*(1/69)-157*h(r)^2*(1/138))*(diff(q(r), r))^4+(1144*r^7*q(r)^3*(1/69)+512*q(r)^2*h(r)*r^5*(1/23)+116*q(r)*h(r)^2*r^3*(1/23))*(diff(q(r), r))^3+(1744*r^6*q(r)^4*(1/69)+1304*r^4*h(r)*q(r)^3*(1/69)-788*r^2*h(r)^2*q(r)^2*(1/69))*(diff(q(r), r))^2+(1/69)*(3136*(r^4*q(r)^2+9*r^2*h(r)*q(r)*(1/7)+27*h(r)^2*(1/196)))*q(r)^3*r*(diff(q(r), r))+24*r^4*q(r)^6+1520*r^2*h(r)*q(r)^5*(1/69)-224*q(r)^4*h(r)^2*(1/69))*r*h(r)^2*(diff(h(r), r))^3*(1/480)+(1/1440)*(71*(r^5*(r^4*q(r)^2+52*r^2*h(r)*q(r)*(1/71)-57*h(r)^2*(1/142))*(diff(q(r), r))^5+(326*r^8*q(r)^3*(1/71)+664*q(r)^2*h(r)*r^6*(1/71)+147*q(r)*h(r)^2*r^4*(1/71))*(diff(q(r), r))^4+288*q(r)^2*r^3*(r^4*q(r)^2+43*r^2*h(r)*q(r)*(1/12)-65*h(r)^2*(1/72))*(diff(q(r), r))^3*(1/71)+1072*q(r)^3*r^2*(r^4*q(r)^2+215*r^2*h(r)*q(r)*(1/67)+21*h(r)^2*(1/134))*(diff(q(r), r))^2*(1/71)+88*q(r)^4*(r^4*q(r)^2+26*r^2*h(r)*q(r)+12*h(r)^2*(1/11))*r*(diff(q(r), r))*(1/71)+1008*q(r)^5*(r^4*q(r)^2+34*r^2*h(r)*q(r)*(1/21)-4*h(r)^2*(1/63))*(1/71)))*h(r)^3*(diff(h(r), r))^2-(1/1440)*(19*(r^6*(r^2*q(r)+30*h(r)*(1/19))*(diff(q(r), r))^6-236*r^3*(r^4*q(r)^2+50*r^2*h(r)*q(r)*(1/59)+30*h(r)^2*(1/59))*(diff(q(r), r))^5*(1/19)-(1/19)*(116*(r^4*q(r)^2-352*r^2*h(r)*q(r)*(1/29)-165*h(r)^2*(1/29)))*q(r)*r^2*(diff(q(r), r))^4-2656*q(r)^2*r*(r^4*q(r)^2+37*r^2*h(r)*q(r)*(1/83)+30*h(r)^2*(1/83))*(diff(q(r), r))^3*(1/19)-1840*q(r)^3*(r^4*q(r)^2-176*r^2*h(r)*q(r)*(1/115)-12*h(r)^2*(1/23))*(diff(q(r), r))^2*(1/19)-2752*q(r)^5*r*(r^2*q(r)-2*h(r)*(1/43))*(diff(q(r), r))*(1/19)-384*q(r)^6*(r^2*q(r)-4*h(r)*(1/3))*(1/19)))*r*h(r)^4*(diff(h(r), r))-(1/480)*h(r)^5*r^2*(r*(diff(q(r), r))+2*q(r))^7)/((-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^7*r^2*Pi^2)+1/(2*Pi^2*h(r)^2))+3+(-3*h(r)^2*(diff(q(r), r))^3*r^4+4*h(r)*q(r)^2*(diff(h(r), r))*(diff(q(r), r, r))*r^4-4*h(r)*q(r)^2*(diff(q(r), r))*(diff(h(r), r, r))*r^4+h(r)*q(r)*(diff(h(r), r))*(diff(q(r), r))^2*r^4+2*q(r)^2*(diff(h(r), r))^2*(diff(q(r), r))*r^4-18*h(r)^2*q(r)*(diff(q(r), r))^2*r^3-8*h(r)*q(r)^3*(diff(h(r), r, r))*r^3+20*h(r)*q(r)^2*(diff(h(r), r))*(diff(q(r), r))*r^3+4*q(r)^3*(diff(h(r), r))^2*r^3-36*h(r)^2*q(r)^2*(diff(q(r), r))*r^2+4*h(r)^2*q(r)*(diff(h(r), r))*(diff(q(r), r, r))*r^2-4*h(r)^2*q(r)*(diff(q(r), r))*(diff(h(r), r, r))*r^2-6*h(r)^2*(diff(h(r), r))*(diff(q(r), r))^2*r^2+12*h(r)*q(r)^3*(diff(h(r), r))*r^2+7*h(r)*q(r)*(diff(h(r), r))^2*(diff(q(r), r))*r^2-q(r)^2*(diff(h(r), r))^3*r^2-24*h(r)^2*q(r)^3*r-8*h(r)^2*q(r)^2*(diff(h(r), r, r))*r-8*h(r)^2*q(r)*(diff(h(r), r))*(diff(q(r), r))*r+14*h(r)*q(r)^2*(diff(h(r), r))^2*r-16*h(r)^2*q(r)^2*(diff(h(r), r)))/(r*(r*q(r)*(diff(h(r), r))-r*(diff(q(r), r))*h(r)-2*q(r)*h(r))^3) = 0:

eq2 := -8*Pi*((-(1/180)*(r*(diff(q(r), r))+2*q(r))*q(r)*((1/2)*r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(-r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))^2*r^2*h(r)*(diff(h(r), r, r, r))+(1/180)*q(r)*((1/2)*r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(-r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*(r^2*q(r)+h(r))^2*r^3*h(r)*(diff(h(r), r))*(diff(q(r), r, r, r))-(1/80)*(r*(diff(q(r), r))+2*q(r))*(2*r*q(r)*(diff(h(r), r))*(1/3)+h(r)*(r*(diff(q(r), r))+2*q(r)))*q(r)^2*(r^2*q(r)+h(r))^2*r^3*h(r)*(diff(h(r), r, r))^2+(1/60)*(r^2*q(r)+h(r))*r*(q(r)*(r^2*q(r)+h(r))*r^2*h(r)*((1/2)*q(r)^2*(diff(h(r), r))^2*r^2+r*h(r)*q(r)*(r*(diff(q(r), r))+2*q(r))*(diff(h(r), r))+h(r)^2*(r*(diff(q(r), r))+2*q(r))^2)*(diff(q(r), r, r))+(1/3)*(r^2*q(r)+3*h(r)*(1/2))*(r*(diff(q(r), r))+2*q(r))*q(r)^3*r^3*(diff(h(r), r))^3+2*q(r)^2*(r^2*q(r)+h(r))*r^2*((diff(q(r), r))^2*r^2+7*r*q(r)*(diff(q(r), r))+11*q(r)^2*(1/2))*h(r)*(diff(h(r), r))^2*(1/3)+(1/6)*(r*(diff(q(r), r))+2*q(r))*q(r)*r*h(r)^2*(r^2*(r^2*q(r)-2*h(r))*(diff(q(r), r))^2+(28*r^3*q(r)^2+16*r*h(r)*q(r))*(diff(q(r), r))+16*r^2*q(r)^3+4*h(r)*q(r)^2)*(diff(h(r), r))-7*(r*(diff(q(r), r))+2*q(r))^2*h(r)^3*(r^2*(r^2*q(r)+5*h(r)*(1/7))*(diff(q(r), r))^2+4*r*q(r)*(r^2*q(r)-h(r))*(diff(q(r), r))*(1/7)+(1/7)*(16*(r^2*q(r)+(1/2)*h(r)))*q(r)^2)*(1/6))*(diff(h(r), r, r))-(1/60)*((1/4)*r*q(r)*(diff(h(r), r))+h(r)*(r*(diff(q(r), r))+2*q(r)))*q(r)*(r^2*q(r)+h(r))^2*r^4*h(r)^2*(diff(h(r), r))*(diff(q(r), r, r))^2+(1/360)*(7*(r^2*q(r)+h(r)))*r^2*(-(1/7)*(2*(r^2*q(r)+3*h(r)*(1/2)))*q(r)^3*r^3*(diff(h(r), r))^3-4*q(r)^2*(r*(diff(q(r), r))+7*q(r)*(1/2))*(r^2*q(r)+h(r))*r^2*h(r)*(diff(h(r), r))^2*(1/7)-(1/7)*r*q(r)*(r^2*(r^2*q(r)-2*h(r))*(diff(q(r), r))^2+(22*r^3*q(r)^2+10*r*h(r)*q(r))*(diff(q(r), r))+22*r^2*q(r)^3+10*h(r)*q(r)^2)*h(r)^2*(diff(h(r), r))+(r*(diff(q(r), r))+2*q(r))*h(r)^3*(r^2*(r^2*q(r)+5*h(r)*(1/7))*(diff(q(r), r))^2-8*r*q(r)*(r^2*q(r)+2*h(r))*(diff(q(r), r))*(1/7)+4*q(r)^2*(r^2*q(r)+5*h(r)*(1/7))))*(diff(h(r), r))*(diff(q(r), r, r))+(1/2880)*q(r)^4*(diff(h(r), r))^6*r^5-(1/720)*r^4*q(r)^3*(r*(diff(q(r), r))+2*q(r))*(r^2*q(r)+2*h(r))*(diff(h(r), r))^5-(1/360)*r^3*q(r)^2*((r^2*q(r)+(1/2)*h(r))*r^2*(r^2*q(r)+3*h(r))*(diff(q(r), r))^2+(12*q(r)^3*r^5+34*q(r)^2*h(r)*r^3+18*q(r)*h(r)^2*r)*(diff(q(r), r))+8*r^4*q(r)^4+24*r^2*h(r)*q(r)^3+12*h(r)^2*q(r)^2)*(diff(h(r), r))^4-(1/360)*q(r)*r^2*h(r)*(r^3*(r^4*q(r)^2-6*r^2*h(r)*q(r)-11*h(r)^2*(1/2))*(diff(q(r), r))^3+(22*q(r)^3*r^6-4*q(r)^2*h(r)*r^4-17*r^2*h(r)^2*q(r))*(diff(q(r), r))^2+(58*r^5*q(r)^4+20*q(r)^3*h(r)*r^3-20*h(r)^2*r*q(r)^2)*(diff(q(r), r))+24*r^4*q(r)^5-16*q(r)^4*h(r)*r^2-28*h(r)^2*q(r)^3)*(diff(h(r), r))^3+7*r*h(r)^2*(r^4*(r^4*q(r)^2+2*r^2*h(r)*q(r)*(1/21)-25*h(r)^2*(1/42))*(diff(q(r), r))^4+152*q(r)*(r^4*q(r)^2+4*r^2*h(r)*q(r)*(1/19)-17*h(r)^2*(1/38))*r^3*(diff(q(r), r))^3*(1/21)+(104*r^6*q(r)^4*(1/7)-40*r^4*h(r)*q(r)^3*(1/7)-92*r^2*h(r)^2*q(r)^2*(1/7))*(diff(q(r), r))^2+144*q(r)^3*r*(r^4*q(r)^2-8*r^2*h(r)*q(r)*(1/27)-22*h(r)^2*(1/27))*(diff(q(r), r))*(1/7)+(1/3)*(40*(r^4*q(r)^2+2*r^2*h(r)*q(r)*(1/35)-4*h(r)^2*(1/7)))*q(r)^4)*(diff(h(r), r))^2*(1/480)-(1/720)*(7*(r*(diff(q(r), r))+2*q(r)))*h(r)^3*(r^6*(r^2*q(r)+5*h(r)*(1/7))*(diff(q(r), r))^4-(8*(r^2*q(r)+5*h(r)*(1/7)))*r^3*h(r)*(diff(q(r), r))^3+12*q(r)*r^2*(r^4*q(r)^2+2*r^2*h(r)*q(r)*(1/7)-(1/7)*h(r)^2)*(diff(q(r), r))^2+32*r*q(r)^2*(r^4*q(r)^2-4*r^2*h(r)*q(r)-3*h(r)^2)*(diff(q(r), r))*(1/7)+(1/7)*(48*(r^2*q(r)+2*h(r)*(1/3)))*q(r)^3*(r^2*q(r)-h(r)))*(diff(h(r), r))+(1/1440)*h(r)^4*r^3*(r*(diff(q(r), r))+2*q(r))^6)/((-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^6*r^3*Pi^2)-1/(6*Pi^2*h(r)^2))+3+(h(r)*(diff(q(r), r))^2*r^3+2*q(r)*(diff(h(r), r))*(diff(q(r), r))*r^3+4*h(r)*(diff(q(r), r))*r^2*q(r)+4*q(r)^2*(diff(h(r), r))*r^2+4*h(r)*r*q(r)^2+4*h(r)*(diff(h(r), r))*(diff(q(r), r))*r-q(r)*(diff(h(r), r))^2*r+8*q(r)*h(r)*(diff(h(r), r)))/((r*q(r)*(diff(h(r), r))-r*(diff(q(r), r))*h(r)-2*q(r)*h(r))^2*r) = 0:

iq1 := h(0) = 1, (D(h))(0) = 0, (D(D(h)))(0) = -2, (D(D(D(h))))(0) = 0, q(0) = 1, (D(q))(0) = 0, (D(D(q)))(0) = 0, (D(D(D(q))))(0) = 0

h(0) = 1, (D(h))(0) = 0, ((D@@2)(h))(0) = -2, ((D@@3)(h))(0) = 0, q(0) = 1, (D(q))(0) = 0, ((D@@2)(q))(0) = 0, ((D@@3)(q))(0) = 0

(1)

ds1 := dsolve([eq1, eq2, iq1], numeric)

Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

 

# check if the system {eq1, eq2} is an ODE system wrt h(t) and q(t);

sol := solve({eq1, eq2}, [diff(h(r), r$4), diff(q(r), r$4)])

[]

(2)

# as it's not the case try to represent rhis system in a simple form

with(LargeExpressions):

H1 := collect(eq1, diff(h(r), r$4), Veil[A] );

# check if A[1] contains diff(q(r), r$4)
Unveil[A](A[1]);

# Veil A[2]
Q1 := collect(expand(Unveil[A](A[2])), diff(q(r), r$4), Veil[A2] );
 

(2/45)*A[1]*(diff(diff(diff(diff(h(r), r), r), r), r))+(1/360)*A[2] = 0

 

(r*(diff(q(r), r))+2*q(r))*q(r)^2*(r^2*q(r)+h(r))^2*h(r)^2/(Pi*(-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^5)

 

16*A2[1]*(diff(diff(diff(diff(q(r), r), r), r), r))+A2[2]

(3)

# Then eq1 is of the form


edo1 := ''eq1'' = eval(H1, A[2]=Q1):
edo1;

eq1 = ((2/45)*A[1]*(diff(diff(diff(diff(h(r), r), r), r), r))+(2/45)*A2[1]*(diff(diff(diff(diff(q(r), r), r), r), r))+(1/360)*A2[2] = 0)

(4)

# observe that eq2 doen't contain any derivatives of order 4

indets(eq2);

{r, diff(diff(diff(h(r), r), r), r), diff(diff(diff(q(r), r), r), r), diff(diff(h(r), r), r), diff(diff(q(r), r), r), diff(h(r), r), diff(q(r), r), h(r), q(r)}

(5)

H2 := collect(eq2, diff(h(r), r$3), Veil[B] );

# check if B[1] contains diff(q(r), r$3)
Unveil[B](B[1]);

# Veil B[2]
Q2 := collect(expand(Unveil[B](B[2])), diff(q(r), r$3), Veil[B2] );

# Then eq2 is of the form

edo2 := ''eq2'' = eval(H2, B[2]=Q2):
edo2;

(1/45)*B[1]*(diff(diff(diff(h(r), r), r), r))+(1/360)*B[2] = 0

 

h(r)*(r^2*q(r)+h(r))^2*(2*r*(diff(q(r), r))*h(r)+r*q(r)*(diff(h(r), r))+4*q(r)*h(r))*q(r)*(r*(diff(q(r), r))+2*q(r))/((-r*q(r)*(diff(h(r), r))+2*q(r)*h(r)+r*(diff(q(r), r))*h(r))^5*r*Pi)

 

8*B2[1]*(diff(diff(diff(q(r), r), r), r))+B2[2]

 

eq2 = ((1/45)*B[1]*(diff(diff(diff(h(r), r), r), r))+(1/45)*B2[1]*(diff(diff(diff(q(r), r), r), r))+(1/360)*B2[2] = 0)

(6)

# thus your system writes:
# (A, A2, are functions of r and derivatives of f and q up to order 3, at most)
# (B, B2, are functions of r and derivatives of f and q up to order 2, at most)


print~({edo1, edo2}):

eq1 = ((2/45)*A[1]*(diff(diff(diff(diff(h(r), r), r), r), r))+(2/45)*A2[1]*(diff(diff(diff(diff(q(r), r), r), r), r))+(1/360)*A2[2] = 0)

 

eq2 = ((1/45)*B[1]*(diff(diff(diff(h(r), r), r), r))+(1/45)*B2[1]*(diff(diff(diff(q(r), r), r), r))+(1/360)*B2[2] = 0)

(7)

# Veil A2 wrt diff(h(r), r$3)

collect(expand(Unveil[A2](A2[2])), diff(h(r), r$3), Veil[A22] ):
collect(expand(Unveil[A2](A2[3])), diff(h(r), r$3), Veil[A23] ):

# thus eq1 writes

edo1_1 := ''eq1'' = eval(rhs(edo1), [A2[2]=%%, A2[3]=%]):
edo1_1;

eq1 = ((2/45)*A[1]*(diff(diff(diff(diff(h(r), r), r), r), r))+(2/45)*A2[1]*(diff(diff(diff(diff(q(r), r), r), r), r))+(1/45)*A22[1]*(diff(diff(diff(h(r), r), r), r))+(1/360)*A22[2] = 0)

(8)

# If you plug the expression of eq2 into the expression above, you finally get a single ODE
# with two unknowns and then you miss one ODE.
#
#
# To convince you look at thimple toy model


edosys := {
  diff(f(x), x$2)+diff(g(x), x$2)=x,
  diff(f(x), x)+diff(g(x), x)=1,
  f(0)=0, D(f)(0)=0,
  g(0)=0, D(g)(0)=0
};
infolevel[dsolve]:=100:
dsolve(edosys);

{diff(diff(f(x), x), x)+diff(diff(g(x), x), x) = x, diff(f(x), x)+diff(g(x), x) = 1, f(0) = 0, g(0) = 0, (D(f))(0) = 0, (D(g))(0) = 0}

(9)

# and now to this well constructed toy model

edosys := {
  diff(f(x), x$2)+diff(g(x), x$2)=x,
  diff(f(x), x$2)-diff(g(x), x$2)=1,
  f(0)=0, D(f)(0)=0,
  g(0)=0, D(g)(0)=0
};
dsolve(edosys);

{diff(diff(f(x), x), x)-(diff(diff(g(x), x), x)) = 1, diff(diff(f(x), x), x)+diff(diff(g(x), x), x) = x, f(0) = 0, g(0) = 0, (D(f))(0) = 0, (D(g))(0) = 0}

 

-> Solving each unknown as a function of the next ones using the order: [g(x), f(x)]
-> Calling odsolve with the ODE diff(diff(y(x) x) x) = -1/2+(1/2)*x y(x) explicit singsol = none
Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
<- quadrature successful
-> Calling odsolve with the ODE diff(diff(y(x) x) x) = 1/2+(1/2)*x y(x) explicit singsol = none
Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
<- quadrature successful

 

{f(x) = (1/12)*x^3+(1/4)*x^2, g(x) = (1/12)*x^3-(1/4)*x^2}

(10)

 


 

Download dsolve_mmcdara.mw

A toy_problem dsolve can't find the solution of, but whose solution can be obtained after reparameterisation:

 

restart:

indolevel[dsolve] := 100:

# A toy problem

edosys := {
  diff(f(x), x$2)+diff(g(x), x$2)=0,
  diff(f(x), x)+diff(g(x), x)=0,
  f(0)=0, D(f)(0)=1,
  g(0)=0, D(g)(0)=-1
};
infolevel[dsolve]:=100:
sol := dsolve(edosys);

{diff(diff(f(x), x), x)+diff(diff(g(x), x), x) = 0, diff(f(x), x)+diff(g(x), x) = 0, f(0) = 0, g(0) = 0, (D(f))(0) = 1, (D(g))(0) = -1}

 

-> Solving each unknown as a function of the next ones using the order: [g(x), f(x)]
-> Calling odsolve with the ODE diff(y(x) x) = -(diff(f(x) x)) y(x) explicit singsol = none

Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature

<- quadrature successful

 

# This system writes

edosys := [
  diff(df(x), x)+diff(dg(x), x)=0,
  diff(f(x), x)=df(x),
  diff(g(x), x)=dg(x),
  df(x)+dg(x)=0,
  f(0)=0, df(0)=1,
  g(0)=0, dg(0)=-1
]:
print~(edosys):

sol := dsolve(edosys);
 

diff(df(x), x)+diff(dg(x), x) = 0

 

diff(f(x), x) = df(x)

 

diff(g(x), x) = dg(x)

 

df(x)+dg(x) = 0

 

f(0) = 0

 

df(0) = 1

 

g(0) = 0

 

dg(0) = -1

 

-> Solving each unknown as a function of the next ones using the order: [g(x), f(x), dg(x), df(x)]
-> Calling odsolve with the ODE diff(y(x) x) = -df(x) y(x) explicit singsol = none
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature

<- quadrature successful
-> Calling odsolve with the ODE diff(y(x) x) = df(x) y(x) explicit singsol = none
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
<- quadrature successful

 

# Observe that original unknowns f(x) and g(x) are meaningless

edosys := [
  diff(df(x), x)+diff(dg(x), x)=0,
  df(x)+dg(x)=0,
  df(0)=1,
  dg(0)=-1
]:
print~(edosys):

sol := dsolve(edosys);

 

diff(df(x), x)+diff(dg(x), x) = 0

 

df(x)+dg(x) = 0

 

df(0) = 1

 

dg(0) = -1

 

{df(x) = 1, dg(x) = -1}

(1)

 


 

Download Toy_Problem.mw

 

 

restart:
sys := {x^2*y+x=1, x*y-y^2=0}:
solve(sys);
    {x = 1, y = 0}, 

       /          /  3         \            /  3         \\ 
      { x = RootOf\_Z  + _Z - 1/, y = RootOf\_Z  + _Z - 1/ }
       \                                                  / 
infolevel[solve]:=100:
solve(sys)
Main: Entering solver with 2 equations in 2 variables
Main: attempting to solve as a linear system
Main: attempting to solve as a polynomial system
Main: Polynomial solver successful. Exiting solver returning 1 solution
    {x = 1, y = 0}, 

       /          /  3         \            /  3         \\ 
      { x = RootOf\_Z  + _Z - 1/, y = RootOf\_Z  + _Z - 1/ }
       \                                                  / 

 

This suggests solve calls some polynomial solver.
Searching for it in the help pages returns SolveTools/PolynomialSystem. I don't know if solve calls this procedure (showstat(solve) is hard to browse). Assuming it does:
 

SolveTools:-PolynomialSystem(sys, {x,y});

Main: polynomial system split into 1 parts under preprocessing
Main: trying resultant methods
PseudoResultant: normalize equations, length= 43
PseudoResultant: 353502 [1 3999999986 y 1] 2 2 43 0 3 0
PseudoResultant: normalize equations, length= 13
PseudoResultant: normalize equations, length= 35
PseudoResultant: 30000 [1 100000559 x] 1 1 13 0 3 1
PseudoResultant: normalize equations, length= 3
PseudoResultant: -10 [] 0 0 3 0 3 1
PseudoResultant: 201729 [1 1000012108 y] 2 2 35 1 8 0
PseudoResultant: normalize equations, length= 21
PseudoResultant: 117197 [1 700003740 x] 1 1 21 1 8 0
PseudoResultant: normalize equations, length= 3
PseudoResultant: -10 [] 0 0 3 0 3 0
PseudoResultant: 2 solutions found, now doing backsubstitution
PseudoResultant: backsubstitution of x
PseudoResultant: backsubstitution of y
PseudoResultant: backsubstitution of x
PseudoResultant: backsubstitution of y
    {x = 1, y = 0}, 

       /          /  3         \            /  3         \\ 
      { x = RootOf\_Z  + _Z - 1/, y = RootOf\_Z  + _Z - 1/ }
       \                                                  / 


 

restart
p := 35*x^8 + 80*x^7 + 140*x^6 + 504*x^5 + 1260*x^4 + 1960*x^3 + 1960*x^2 + 1120*x + 10:
dp := diff(p, x):
fsolve(dp);
                         -1., -1., -1.

But I suspect that you are looking for an answer you can obtain "by hand" aren't you?
Here is, written in Maple, a step-by-step procedure which only requires doing polynomial division (which can be done by hand)
Download ByHand.mw

Details:

  • Observe -1 is a root of dp = diff(p, x)
  • Thus dp = Pol(x) * (x+1)^r with r >=1 and degree(Pol) <= 6
    Find the value of r this way:
    1. Set Q =Pol(x)
    2.  Divide (can be done by hand) Q by (x+1) and note R the remainder
    3. Go to point 1 until R = 0
  • The value of r is the number of times you executed the steps 1 to 3
    Here r=3 ==> dp = Pol(x) * (x+1)^3 with degree(Pol) = 4
  • Search if Pol(x) has a real zero Z by applying the procedure given at points 1 to 3.
    Here you recursively divide 4 times Pol(x) by (x-Z) : if the last remainder is 0, then is a root of dp, if not (which is the case) dp has only 1 real root (-1) of multipliciy 3.

Thus p has a only one stationnary point at x=-1 (I don't know if you must answer 1 or 3 ???)

 

The goal is to produce almost exactly the expressio of the solution you give, thus we have to go beyond the dsolve to reshape the solution Maple provides.
The procedure is described step-by-step

restart:

local I:

I

 

Warning, The imaginary unit, I, has been renamed _I

 

sys := { diff(I(t), t) = -theta*I(t) -f(t), I(s__i)=0 }

{I(s__i) = 0, diff(I(t), t) = -theta*I(t)-f(t)}

(1)

sol := dsolve(sys, I(t))

I(t) = (Int(-f(_z1)*exp(theta*_z1), _z1 = s__i .. t))*exp(-theta*t)

(2)

v := indets(sol, name)[1]

_z1

(3)

sol := subs(v=u, sol) assuming t < s__i

I(t) = (Int(-f(u)*exp(theta*u), u = s__i .. t))*exp(-theta*t)

(4)

sol := simplify(IntegrationTools:-Flip(rhs(sol)))

(Int(f(u)*exp(theta*u), u = t .. s__i))*exp(-theta*t)

(5)

 

Download OneWay.mw

(1/2, 1/2) is not always a solution, look here

Download solution.mw

Maybe you missed something?

Probably a hideous way to proceed

Using  result := ssystem("tasklist <opts>"), where < opts >depends on what OS you use (Windows only) you can get a table (iin Windows sense) which contains all the PIDs.
This require to "postprocess" resultto display only the PIDs associated to a mserver.exeprocess

When you run xmaple, open a worksheet run the previous command to get the mserver's PIDs.
Proceed this way ach time you open a new worksheet: by comparing the new PID's list to the one of the previously opened worksheet you will get the PID associated to your current worksheet.
This can be useful is the stopbutton doesn't cancel the computations and if you can't close the current document.

Unfortunately I don't know how to identify to what node a mserverprocess belongs to when I distribute the computations over several nodes while using the GridPackage (being able to kill the computations on a specific node is something I would really like to have, all the more so that even after leaving Maple the process still exists and keeps using memory).

The command which generates output (4) is incorrect:

  • You use = instead of := 
  • You use exp^(...) instead of exp(...) 

Here is the correction (done with Maple 2015 whichh doesn't accept this awfull notation C(x, t) := ...)

 

restart

with(plottools):

with(plots):

with(CurveFitting):

Digits := 10:

f := proc (t) options operator, arrow; 7.0*exp(-(1/2000000)*(t-13180)^2)+4.7*exp(-(1/3200000)*(t-16000)^2) end proc:

p1 := plot(f(t), t = 0 .. 20000, color = green); -1; plots[display]({p1})

 

D1 := 15:

varepsilon := 200000:

L := 6500:

n := 200:

t := 1000

1000

(1)

lambda := simplify(evalf(n*Pi*sqrt((1/2)*D1+sqrt((1/4)*D1^2+varepsilon*(n*Pi/L)^2))/L))

.6928578233

(2)

b := 2*(int(f(t)*sin(m*Pi*x/L), x = 0 .. L))/L

-0.6366197724e-1*(0.1409730543e-28*cos(3.141592654*m)-0.1409730543e-28)/m

(3)

C := proc (x, t) options operator, arrow; sum(b*exp(-lambda^2*t)*sin(m*Pi*x/L), m = 1 .. 2) end proc

proc (x, t) options operator, arrow; sum(b*exp(-lambda^2*t)*sin(m*Pi*x/L), m = 1 .. 2) end proc

(4)

uu1000 := [seq(evalf(C(L-i, t)), i = 0 .. 6500, 100)]:

NULL

xx := [seq(k, k = 0 .. 6500, 100)]:

p2 := plot(xx, uu1000, color = cyan):

plots[plots:-display]({p2});

 
 

Download easy_way_mmcdara.mw

L:=[[3, 2], [2, 1], [1, 2], [1, 2], [2, 3], [2, 1], [1, 2], [1, 1], [2, 1], [1, 2], [1, 1], [2, 1], [1, 1], [1, 3], [1, 2], [2, 1], [1, 3], [1, 3], [1, 3], [1, 2], [2, 2], [2, 3]]: 

Ls := convert~(L0, set): 
L1 := map(u -> [[u[]], ListTools:-Occurrences(u, Ls)], {Ls[]}): 
Lk := map(u -> if numelems(u[1])=1 then [[u[1][1]$2], u[2]] else u end if, L1)

{[[1, 1], 3], [[1, 2], 11], [[1, 3], 4], [[2, 2], 1], [[2, 3], 3]}

L2 := [map(u -> [add(op(u[1])), u[2]], Lk)[]]

           [[2, 3], [3, 11], [4, 1], [4, 4], [5, 3]]

answer :=(`*`@op)( (`*`@op)~(L2))

                             190080


If you want to find the argument which minimizes the sum of the norms for a given value of lambda, this is quite simple:

w[opt] := (X^+ . X + lambda*~J)^(-1) . X^+ . Y

where X is a N by P matrix, Y a column vector of length N and J the identity matrix of dimension N.

But maybe you are talking about Ridge regression where you seek fot the couple (w[opt], lambda[opt]) which minimizes thz sum of the norms???

Several things are weird or incorrect:

  • Do you really need this weird Digits:=100???
    It works quite the same with Digits:=10.
     
  • p(t) is a nonsense, for the integration is done over t and thus its result cannot depend on t:
    p := int(f(t)*exp(-lambda^2*t), t=0..L)
                                         -134
                          -4.804438634 10    
    
  • As p is a constant, C(x, t) is a function of x alone.
    The message 
    Error, (in sum) summation variable previously assigned, second argument evaluates to 200. = 1 .. 500
    is clear: you have previously assigned n to 200.
    The cure: protect n by writing 'n' =1..500
    C := x -> sum((2/L*sin(n*Pi*x/L)*exp(1)*sin(n*Pi*x/L))*p, 'n' = 1 .. 500):
    C(1);
                                         -136
                          -1.871559740 10    
    

With these correction the worksheet doesn't contain any error...
But are you sure that the integral

int(f(t)*exp(-lambda^2*t), t=0..L)

is the one you wanted to write???



In Maple 2015.2 SumTools doesn't offer a procedure Change as IntegrationTools does.
So the idea to transform the sum/Sum into Int, to apply Change, and to go back to the sum/Sum.

S := sum(a[k]*(k+r)*(k+r-1)*x^(k+r-1), k = 0 .. infinity): 
J := Int(op(S)): 
IntegrationTools:-Change(J, k=j+1, j):
IntegrationTools:-Change(%, j=k, k): 
Sum(op(%))
         infinity                                     
          -----                                       
           \                                          
            )                                  (k + r)
           /     a[k + 1] (k + 1 + r) (k + r) x       
          -----                                       
          k = -1                                      

 

@sursumCorda 

You're right.
Here is another way based on the following principle:

  • Let A some term in rules.
  • Set B = eval(A, R) where R denotes the rules with element removed
  • Keep proceeding this way while B <> A after setting R=R \ B and A=B.

I initially removed elements of the form b=b (trivial 1-cycles).
 

restart

with(ListTools):

cycle := proc(i)
  local A, S, R, B, j:

  A := rules[i];
  S := A;
  if Search((rhs=lhs)(A), rules) > 0 then
    #----- cycle of length 2
    return [A, (rhs=lhs)(A)];
  end if:

  R := subsop(i=NULL, rules);
  B := lhs(A) = eval(rhs(A), R);

  if (lhs=rhs)(B) then
    return S, rhs(A)=rhs(B);

  else
    while numelems(R) > 0 and `not`(is(A=B)) do
     S := S, rhs(A)=rhs(B);
     j := Search(S[-1], R);
     A := R[j];
     R := subsop(j=NULL, R);

     if Search(rhs(A)=lhs(S[1]), rules) > 0 then
       #----- cycle of length 2
       return [S, rhs(A)=lhs(S[1])];
     end if:

     B := lhs(A) = eval(rhs(A), R);
    end do;
  end if:
  S := [S]:

  if lhs(S[1])=rhs(S[-1]) then
    if numelems(S) > 1 then
      return [S]
    else
      return []
    end if:
  else
      return []
  end if;
end proc:
 

rules := [g = d, e = a, a = b, f = d, c = g, b = b, d = c, c = f, a = e, f = g];
rules := map(u -> if `not`(is(u)) then u end if, rules);

[g = d, e = a, a = b, f = d, c = g, b = b, d = c, c = f, a = e, f = g]

 

[g = d, e = a, a = b, f = d, c = g, d = c, c = f, a = e, f = g]

(1)

for i from 1 to numelems(rules) do
  printf("from = %a : cycle = %a\n", rules[i], cycle(i));
end do;

from = g = d : cycle = [g = d, d = c, c = g]
from = e = a : cycle = [e = a, a = e]

from = a = b : cycle = []
from = f = d : cycle = [f = d, d = c, c = f]
from = c = g : cycle = [c = g, g = d, d = c]
from = d = c : cycle = [d = c, c = g, g = d]
from = c = f : cycle = [c = f, f = d, d = c]
from = a = e : cycle = [a = e, e = a]
from = f = g : cycle = [f = g, g = d, d = c, c = f]

 

 


 

Download cycles_1.mw


EDITED
to get all the cycles without permutations removed, replace the last for..do..end do structure by
 

# AEC stands for All Elementary Cycles (rotations removed) 

AEC := NULL:
for i from 1 to numelems(rules) do
  LocalCycle := cycle(i):
  if `not`(has(convert~([AEC], set), {convert(LocalCycle, set)})) then
    AEC := AEC, LocalCycle;   end if:   printf("from = %a : cycle = %a\n", rules[i], LocalCycle);
end do:
from = g = d : cycle = [g = d, d = c, c = g]
from = e = a : cycle = [e = a, a = e]
from = a = b : cycle = []
from = f = d : cycle = [f = d, d = c, c = f]
from = c = g : cycle = [c = g, g = d, d = c]
from = d = c : cycle = [d = c, c = g, g = d]
from = c = f : cycle = [c = f, f = d, d = c]
from = a = e : cycle = [a = e, e = a]
from = f = g : cycle = [f = g, g = d, d = c, c = f]

print~({AEC} minus {[]}):
                         [e = a, a = e]
                     [f = d, d = c, c = f]
                     [g = d, d = c, c = g]
                  [f = g, g = d, d = c, c = f]

 

1 2 3 4 5 6 7 Last Page 1 of 38