vv

13822 Reputation

20 Badges

9 years, 315 days

MaplePrimes Activity


These are answers submitted by vv

Your surface is actually a curve; it depends only on r = sqrt(u^2+v^2).
Near r=0 this curve is almost a line.

You want

int((((x/b)^c-d))*A*x^e, x=0..X) assuming c>0,e>0;

@logiaco

For one parameter only, SmithForm e.g. could be used.
The only reasonable solution for >1 parameters I see
is to write a customized version of ReducedRowEchelonForm
e.g. RR(A, params:=indets(A))
having as result a sequence of lists

[cond, R]

where cond is  a list of conditions on parameters and R is the corresponding echelon form.

e.g.

[[Determinant(A)<>0], IdentityMatrix(n)], ...

This should not be difficult but I am not sure whether you really need it.

 

The system is not compatible. Execute in your worksheet:

solve({A[1], A[2], A[3], A[4], A[5]}, [a, b, c, d, e, f]);
    [[a = 2+b, b = b, c = -2*b, d = -6+4*b, e = -4*b+3, f = -1+3*b]]
subs(%[], A[6]);
    43 = 51

eqx:=diff(f(b),b,b) = -(1/2)*(6*(diff(f(b), b))*f(b)-8*b*(diff(f(b), b))-2*f(b)+diff(f(b),b)+2)*(diff(f(b),b))/((-b+f(b))*(-1+f(b))):

ic:=f(3/8)=0, D(f)(3/8)=d:

s:=dsolve({eqx,ic},numeric,parameters=[d]):

pp:=proc(u)
  s(parameters=[d=u]);
  abs( eval(f(b),s(1/2)) - 1/2)
end:

N:=100000: V:=Vector(N/10, i-> pp(2.4+i/N)):

min(V):min[index](V):
s(parameters=[2.4+%/N]);
#  [d = 2.485270000]
s(3/8);
# [b = .375000000000000, f(b) = 0., diff(f(b), b) = 2.485270000]
s(1/2);
#[b = .500000000000000, f(b) = .499859411261823, diff(f(b), b) = 1.00693188008423]
plots[odeplot](s,3/8..1/2);



The ODE may be expressed wrt f''(b) by:

eq:=diff(f(b), b, b) = (1/2)*((-8*b+6*f(b)+1)*(diff(f(b), b))^2+(-2*f(b)+2)*(diff(f(b), b))+2*b-2*f(b))/(f(b)*(b-f(b)));

Note that at both boundary values, the denominator is 0 (!).

Let's try using parameters for an IC problem:
b0:=(3/8+1/2)/2:
ss:=dsolve({eq, f(b0)=A, D(f)(b0)=B}, numeric, parameters=[A,B]):
pp:=proc(u,v)
ss(parameters=[A=u,B=v]);
abs(eval(f(b),ss(3/8)) - 0) + abs( eval(f(b),ss(1/2)) - 1/2)
end:

We want to minimize pp in order to be as close as possible to your conditions.
Here only a crude attempt is made:

M:=Matrix(37, (i,j) -> pp(i/100,j/100)):
min[index](M);min(M);
 
                            37, 37
                  0.44450458358379435

ss(parameters=[A=0.37,B=0.37]);
ss(3/8);
  [b = .375000000000000, f(b) = .362588443481166, diff(f(b), b) = -0.179678246588966e-1]
ss(1/2);
  [b = .500000000000000, f(b) = .418083859897371, diff(f(b), b) = 1.17994432455953]

So, it seems that it's not possible to satisfy acceptably your IC.

 

 

 

Executing
eval(L);
in your document ==>
table([c1 = .5*L, c2 = .5*L])

So, you have defined somewhere a hidden infinite recursive definition for L.

That is why I always prefer a clean worksheet mode (with 1D math if possible)
such that everything is visible!

Edit.

Ok, looking closer, the recursive definition is not hidden. It appears at the beginning of the document:

L[c1] := 0.5*L;
L[c2] := 0.5*L;

So, just change:

L[c1] := 0.5*K;
L[c2] := 0.5*K;
and it works

 

 

Maple computes correctly the integral in [0,1] and [1,2], but not in [0,2]. It's a pity.

J:=Int(floor(x^2), x = 0..2);
IntegrationTools:-Split(J,1): value(%);
       5-sqrt(2)-sqrt(3)


They are mathematically equivalent, but `simplify/D` does not implement this. But,

e1 := (D[1]@D[1])(f)(x);
convert(e1,diff): convert(%,D): lprint(%);
    ((D@@2)(f))(x)

p1:=plot3d([[x,y,-y^2],[x,y,x^2]], x=0..1,y=0..x):
p2:=plot3d([[1,y,z]], z=-y^2..1,y=0..1,transparency=0.5):
p3:=plot3d([[x,0,z]], x=0..1,z=0..x^2,transparency=0.5):
p4:=plot3d([[x,x,z]], x=0..1,z=-x^2..x^2,transparency=0.5):
plots[display](p1,p2,p3,p4,labels=["x","y","z"]);

# less memory used

myPDF := (v,t) -> piecewise(t < 0, 0, t < v, 1/v, 0):
myD:= Distribution(PDF = curry(myPDF, 1)):  #v=1
Mean(myD);
    1/2

J:=Int( exp(-I*k*x)/cosh(x), x=-infinity..infinity):
value(IntegrationTools:-Change(J,exp(x)=t));

1. Due to the wonderful 2D math, a variable named _ appeared. This must be corrected.

2. The equation for solve is too complicated to be solved symbolically.

3. For fsolve you must have numerical values for parameters.

PW1:=proc(e::specfunc(anything,piecewise))
local f, o:=op(e);
f:=proc()
  if   nargs=3 then '`if`'(args)
  elif nargs=2 then '`if`'(args,0)
  else '`if`'(args[1],args[2],f(args[3..-1])) fi
end;
f(o)
end:

PW:=e->subsindets(e, specfunc(anything, piecewise), PW1):
####################

PW(piecewise(x<1, 10, x<2, 20, x<3, 30));
   
`if`(x < 1, 10, `if`(x < 2, 20, `if`(x < 3, 30, 0)))

f:=piecewise(x < 0, piecewise(y < 0, 0, 1), piecewise(y < 0, 1, 0)):
PW(f);
    `if`(x < 0, `if`(y < 0, 0, 1), `if`(y < 0, 1, 0))

First 106 107 108 109 110 111 112 Last Page 108 of 120