vv

14027 Reputation

20 Badges

10 years, 43 days

MaplePrimes Activity


These are replies submitted by vv

@rlopez

No need for implicit functions here because the fitting curve can be inversed x = (y - A*y^3)/B, or equivalently  x = a*y - b*y^3.

The problem is that this curve passes thru (0,0) which is far from the provided data, so the "model" seems to be unsuitable.

@rlopez 

 

I had the impression that Analytic is more robust than a command in the Student package.

It's a disappointment not being so; in the next example Analytic looses roots!

 

h:=sin(x) - 1/(x+1);

sin(x)-1/(x+1)

(1)

plot(h, x=0..50);

 

Student:-Calculus1:-Roots(h,x=0..50, numeric);

[.6507516780, 2.880986321, 6.418396937, 9.327799981, 12.63975157, 15.64785930, 18.89982878, 21.94755715, 25.17096082, 28.24012763, 31.44675114, 34.52936974, 37.72493787, 40.81678838, 44.00451897, 47.10309963]

(2)

nops(%);

16

(3)

RootFinding:-Analytic(h, x, 0-I/10 .. 50+I/10):

sort([%]);

[.650751677964220, 2.88098632105449, 12.6397515714604, 21.9475571476892, 25.1709608227370, 28.2401276349762, 31.4467511436534, 34.5293697434195, 37.7249378670212, 40.8167883764839, 44.0045189699563, 47.1030996250431]

(4)

nops(%)

12

(5)

 

# Strangely, increasing the imaginary part ==> OK.
##################################################

RootFinding:-Analytic(h, x, 0-I .. 50+I):

sort([%]);

[.650751677964220, 2.88098632105449, 6.41839693725700, 9.32779998112870, 12.6397515714604, 15.6478593040306, 18.8998287837776, 21.9475571476892, 25.1709608227370, 28.2401276349762, 31.4467511436534, 34.5293697434195, 37.7249378670212, 40.8167883764839, 44.0045189699563, 47.1030996250431]

(6)

nops(%)

16

(7)

 

 

 

 

 

@Rouben Rostamian  

But actually Maple is wrong:  sol[1] (the red one) is not a solution! ( dy/dx should be >=0).

Edit. The solution of the Cauchy problem y(0)=a is unique (x >= 0)  for a > 0.
For a=0  there are two solutions: y = 0 and y = x^3 / 9 (Maple finds only y=0).

@quo 

factrix ignores the second argument. The factor is computed by the procedure.

If you already know the factor, use this simple one:

 

facm:=proc(A::Matrix, q::algebraic)
  local AA,qq;
  subs([qq=q,AA=1/q*A], qq*AA)
end proc;

proc (A::Matrix, q::algebraic) local AA, qq; subs([qq = q, AA = A/q], qq*AA) end proc

(1)

M:=Matrix([[0,-2*m*omega,0], [2*m*omega,0,0], [0,0,0]]);

_rtable[18446744074366181238]

(2)

facm(M,2);

2*_rtable[18446744074366175342]

(3)

facm(M,m);

m*_rtable[18446744074366169206]

(4)

But whose slope?

But in your approximations appears gamma itself, for which evalf is used!

I think that "solid" people parametrize and obtain the result if they want. Thank you for your thanks.

@Markiyan Hirnyk 

@Markiyan Hirnyk 

You need other tools for such problems. E.g. for the area:

f:=(1/10)*x^2-(69/790)*x+5569/255960-(3/79)*x*y-(77/4266)*y+(1/4)*y^4-(1/3)*y^3+(1/6)*y^2 - 3/1330:
evalf(Int( piecewise(f<0,1,0), x=0 .. 1, y=0..1));

       .1706012052

For a symbolic result, parametrize first. ==>

 

 

 

 

 

convert does not replace a space by \n; it simply inserts some \n 's.

Here is a test:


 

restart;

a:=add(f(i),i=1..1000000):

s:=convert(a,string):

length(s);

9888904

(1)

fprintf("d:/dnld/ss.txt","%s\n",s);

9888905

(2)

s1:=StringTools:-DeleteSpace(s):

length(s1);

9888895

(3)

fprintf("d:/dnld/ss1.txt","%s\n",s1);

9888896

(4)

close("d:/dnld/ss.txt");

close("d:/dnld/ss1.txt");

#####################

restart;

s:=readbytes("d:/dnld/ss.txt",infinity,TEXT):

length(s);

9888905

(5)

f:=x->x;

proc (x) options operator, arrow; x end proc

(6)

eval(parse(s));

500000500000

(7)

s1:=readbytes("d:/dnld/ss1.txt",infinity,TEXT):

eval(parse(s1));

500000500000

(8)

 

 

 

Just for fun, let's find for how many lists is the result of addList correct.
Denote by f(n) the number of "correct" lists with n elements.
Obviously such a list must have the entries in {±1, ±2,...,, ±n}.

f:=proc(n::posint)
   local v, i, P:=Iterator:-CartesianProduct([seq(1..n),seq(-n..-1)]$n);
   add(`if`(add(v) = add(v[v[i]],i=1..n),1,0), v=P) 
   end:

seq('f'(k)=f(k),k=1..6);
    
f(1) = 2, f(2) = 12, f(3) = 78, f(4) = 776, f(5) = 9520, f(6) = 172932

It seems that the sequence f(n) is a serious candidate for  https://oeis.org/

 

 

t=x was just a guess.
y must be >0 if the solution is supposed to pe real (otherwise y^(25/6) is complex in general).
You will need numeric solutions, so the value for x and the initial condition must be given.
[I suspect that the ODE does not have real solutions computable by Maple].

@mehdi jafari 

@Earl 

The procedure ends because only the circles having the radius >= 1/200 are generated.
Note that the line if N > 500 then return was included just for safety, it could be eliminated.
The maths used in the procedure (and some generalizations) is presented in:
Jeffrey C. Lagarias, Colin L. Mallows and Allan R. Wilks,  Beyond the Descartes Circle Theorem,
The American Mathematical Monthly Vol. 109, No. 4 (2002), 338-361.

@mehdi jafari 

When x is in -10000 .. 10000, the oval region inside -6 .. 6  is too small to be seen or even detected by the implicitplot type procedure which is actually used. Note that if you use the suggestion in my answer then the feasible region can be obtained symbolically and explicit, so the plot will be very accurate.

@Ramakrishnan 

eq:=1/(x*y^(2/3))*8.620689655172415*10^(-16)*(-3.11*10^23*x^2*y^(7/6)-3.92*10^19*y^(25/6)+2.14545039999999*10^29*(0.0108*exp(-45.07/y)+exp(-19.98/y^(1/3)-0.00935317203476387*y^2)))/(x+0.015*y^(1.2)):
plots:-inequal(eq>0, x=-10..10, y=0..100, color=yellow);

@mehdi jafari 

You should know better (being your inequality) but usually an inequality has real sub-expressions and e.g. it has y^(7/6).
By the way, usually the domain must by specified (at least when it's not standard).

First 113 114 115 116 117 118 119 Last Page 115 of 177