vv

13837 Reputation

20 Badges

9 years, 322 days

MaplePrimes Activity


These are replies submitted by vv

@sadaf bibi 

If you want to retrieve a solution Q(xi) then compute a := Q(0)  (or a := limit(Q(xi), xi=0))  and take phi(0) = a  as initial condition.  But why don'd you just check Q(xi) in the ODE?

BTW, you have used incorrectly the 2D input in your second solution. I'd recommend to use 1D input.

 

@sadaf bibi

 

restart;

E1 := (diff(phi(xi), xi))^2-a*phi(xi)^2-b*phi(xi)^3-c*phi(xi)^4;

(diff(phi(xi), xi))^2-a*phi(xi)^2-b*phi(xi)^3-c*phi(xi)^4

(1)

S:=dsolve({E1, phi(0) = b*a/(a*c-b^2)},  phi(xi)):
simplify([S], symbolic);

[phi(xi) = 4*a*b*exp(xi*a^(1/2))/((4*a*c-b^2)*exp(2*xi*a^(1/2))-2*b^2*(exp(xi*a^(1/2))+1/2)), phi(xi) = 4*a*exp(-xi*a^(1/2))*b/((4*a*c-b^2)*exp(-2*xi*a^(1/2))-2*b^2*(exp(-xi*a^(1/2))+1/2))]

(2)

g:= -a*b*sech((1/2)*sqrt(a)*xi)^2/(b^2-a*c*(1-tanh((1/2)*sqrt(a)*xi))^2);

-a*b*sech((1/2)*xi*a^(1/2))^2/(b^2-a*c*(1-tanh((1/2)*xi*a^(1/2)))^2)

(3)

gg:=simplify(convert(g,exp));

-4*exp(xi*a^(1/2))*a*b/(exp(2*xi*a^(1/2))*b^2+2*exp(xi*a^(1/2))*b^2-4*a*c+b^2)

(4)

simplify(rhs(S[2]) - gg, symbolic);

0

(5)

 

Download -ode.mw

@Carl Love 

I just wanted to post my foldl version when I saw that you alredy have posted CartProd_NestedSeq which is almost the same.
It seems to be the fastest.

@Carl Love 

Yes, you are right. Only for huge numbers the procedure could have problems if Digits is not large enough.
(Of course my procedure, where Digits is increased automatically if necessary, could be very slow in such cases).

@Kitonum 

Yes, it would be interesting to look at a beginner's face seeing:

 [seq(Array(`..`~(1, numelems~([L]))[], ()-> `?[]`~([L], `[]`~([args]))))]

Of course I understand that Carl's intention was to simply use the procedure, not to understand it.
(And the procedure is really nice as a substitute for CartesianProduct!)

@Carl Love 

I think that the default limit for real arguments is standard and generally accepted.

Note that for limit(f(x),x=c, right), where c is complex, Maple computes limit(f(c+t), t=0, right).

@minhthien2016 

The real option in limit(f(x), x=a, real)  makes sense only when a=infinity and means that limit(f(x), x=infinity) and limit(f(x), x=-infinity) both exist and are equal.

For example,
limit(sqrt(1-x^2)/abs(x), x=infinity, real);  # the limit is complex!
        I

 

@Rouben Rostamian  

Nice problem.
The exact answers are:
Q1:

P:= n -> add( binomial(n-5*k,k)/6^(6*k)*(-1)^(k-1), k=1..floor(n/6))

Q2:
N = 32341

(P(32340)<1/2, P(32341)>1/2)

 

@Rouben Rostamian  

It's only a (~good) approximation for small n.

E.g. P(12) = 7/6^6 - 1/6^12.

Probably the answer for Q2 is almost correct.

 

@Joe Riel 

It would be interesting to see the Maple answer in the form
Y := n -> [1,-1,0][n mod 3 +1]

@JAMET 

I don't see any problem.

 

FC:= proc(n)
uses plots,plottools;
local a,b,u;
{seq(seq(a/b, a = 0 .. b), b = 1 .. n)};
display(seq(circle([u,1/2/denom(u)^2],1/2/denom(u)^2), u=%)
        ,scaling = constrained, color = blue, size = [800, 800])
end proc:

FC(6);

 

 


Download FC.mw

@JAMET 

u runs in the set {0, 1/n, ..., a/b, ..., 1}  constructed just above it.

Please explain for this simpler expression.

f:=diff(v(x, y), x, y) * diff(u(x, y), y, y)^2;

What are you expecting for int(f, x=0..1, y=0..1); ?

 

@Carl Love 

Are you saying that the global variables are saved in a .m file without being explicitely present in the arguments of save?

I have not seen this behavior. Probably you mean something else.

@acer 

Thank you, good to know. Probably I should have guessed it. Actually, if B is not definite, some eigenvalues could be undefined (even if symmetric and commuting A,B implies real eigenvalues -- but their number could be < n).

First 66 67 68 69 70 71 72 Last Page 68 of 176