vv

13877 Reputation

20 Badges

10 years, 0 days

MaplePrimes Activity


These are answers submitted by vv

restart;
FD:=proc(f::procedure, i::nonnegint, h::algebraic)# Finite Difference
    if i=0 then return f fi;
    x -> ( FD(f,i-1,h)(x+h) - FD(f,i-1,h)(x) )
    end proc:

f:= x -> x^5:
FD(f,3,h)(x): simplify(%);
seq( simplify(FD(f,i,1)(x)), i=0..6 );

          150*h^5+180*h^4*x+60*h^3*x^2

          x^5, 5*x^4+10*x^3+10*x^2+5*x+1, 20*x^3+60*x^2+70*x+30, 60*x^2+180*x+150, 120*x+240, 120, 0

 

Denote by p the polynomial.
Solving the equation p=0 wrt sigma and ploting the result
it is easy to conclude that p has a unique positive root in Z for any real sigma.
This root can be obtained by solve symbolically or numerically (for a numeric sigma).
 

p:=6125*Z^4 + 68644*Z^3*sigma - 219625*Z^3 + 255712*Z^2*sigma - 959250*Z^2 + 238144*Z*sigma - 1113500*Z - 245000;

6125*Z^4+68644*Z^3*sigma-219625*Z^3+255712*Z^2*sigma-959250*Z^2+238144*Z*sigma-1113500*Z-245000

(1)

s:=solve(p,sigma);

-(125/4)*(49*Z^4-1757*Z^3-7674*Z^2-8908*Z-1960)/(Z*(17161*Z^2+63928*Z+59536))

(2)

plot(s, Z=0 .. 60);

 

sol:=solve(eval(p, sigma=2), Z, explicit)[1]; # Take e.g.sigma=2

82337/24500+(1/73500)*3^(1/2)*((49000*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+307992598564000)/(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3))^(1/2)+(1/73500)*6^(1/2)*((-24500*((49000*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+307992598564000)/(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3))^(1/2)*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+4958451303347259*3^(1/2)*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)*((49000*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+307992598564000)/(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3))^(1/2)-153996299282000*((49000*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+307992598564000)/(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3))^(1/2))/((359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)*((49000*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(2/3)+42281618707*(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3)+307992598564000)/(359854610853484+(40500*I)*72450303118439610323^(1/2))^(1/3))^(1/2)))^(1/2)

(3)

evalf(sol)

17.86765643+0.4233227866e-9*I

(4)

 

Download solveZ.mw

These examples are useless. See also an algebraic equivalent:

restart;
eq:=sin(x)+x^4+x^2+x+1;
s:=solve(eq, x);      # RootOf(eq, x)
is(eval(eq, x=s)=0);  # FAIL

 

This seems to be related to the bug in the evaluation of 0^n.
See strange odetest result. Is this valid? - MaplePrimes

restart;
diff(1,x)^n;  # 0
0^n;          # 0^n
diff(1,x)^n;  # 0^n

Also for  diff(1,x) replaced with sin(0).

It's a bug about 0^x, not about odetest.

restart;
simplify(0^x) assuming x>0;
                 0^x
normal(0^x) assuming x>0;
                 0^x
eval(0^x) assuming x>0;
                 0^x
expand(0^x) assuming x>0;
                 0^x
0.0^x assuming x>0;
                 0.^x
#########################
is(0^x = 0) assuming x>0;
                 true
limit(0^x, x=x) assuming x>0;
                 0
eval(z^x, z=0) assuming x>0;
                 0
simplify(sin(0)^x) assuming x>0;
                 0
is(0.0^x = 0) assuming x>0;
                 true
#########################
eval(z^x, z=0) assuming x<0;   # ?
                 0

The bug seems to be rather old.
Also strange, in Maple 2018,  0^x  automatically simplifies to 0 (without any assumption).
I suspect that 0^x = 0 was removed from automatic simplification but the evaluation/simplification was not modified.
 

restart
dsolve( diff(y(x),x)=0, ['quadrature'])

Error, (in dsolve) numeric exception: division by zero

You asked a similar question recently.
In your examples dsolve simply does not eliminate a solution even when obtainable from another.
Anyway, note that actually:

  •  (x + y(x))*(1+diff(y(x),x)) = 0 has one solution: y(x) = -x + c.
  •  (x + y(x))*(a+diff(y(x),x)) = 0 has two solutions  (shown).
  • (x + y(x))^2 *(1+diff(y(x), x))=0 has also one solution: y(x) = -x + c. 

If you express the ode in a standard form (as I told you in a comment a few days ago for a similar question),  ODESteps works.

restart;
ode1:=diff(y(x), x) = abs(x - 2)^(2/3);
ic:=y(2)=1;
Student:-ODEs:-ODESteps([ode1,ic]);

Note that the final result is actually 
y(x) = 1+3/5*abs(x-2)^(5/3)*signum(x-2);

Edit.
Maybe better (valid in complex too):
 

ode1:=diff(y(x), x) = ((x - 2)^2)^(1/3);

then:  

Your mysol is not in the form expected by odetest for an implicit solution: F(y(x), x) = 0; in this form everything is OK.

Of course, odetest could have converted mysol, but it does not; maybe it should.

1. There should only be two (solutions).

Actually there is only one: y(x) = c1 * x + c2.

2. Where did the third solution come from? 

E.g. from y' y'' = 0 <==>  (y' ^ 2)' = 0 <==> y'^2 = c1^2 <==> y' = +- c1 <==> y = c1*x + c2 or  y = -c1*x + c2.

isolve recognizes several known equations such as Pytagorean triples, Pell's equation etc and uses the corresponding theorems or algorithms.

It is better and easier to use first symbolic parameters.

dsolve({diff(f(x),x) = a*f(x)^(2/3)+b*f(x), f(1)=c})

                               

V := int(int(int(1, x = -x1 .. x1), y = -r .. r), z = 0 .. h) assuming positive;
First 6 7 8 9 10 11 12 Last Page 8 of 120