vv

14187 Reputation

20 Badges

10 years, 280 days

MaplePrimes Activity


These are answers submitted by vv

The solution is correct, and pdetest shows it.

If you want a direct check, evalb is not enough to verify an equality [it does it only syntactically].
Use is instead.
Or, simplify(L- u(x,t));
==> 0

 

In general you cannot, because the vectors and matrices must have numeric (non-symbolic) dimensions.
But in your case, the solution is obvious.
So, if the equation is

a*V = b*M.V + M.W;  #  V,W vectors; M matrix; a,b scalars;

then

V = (a - b*M)^(-1) . M . W;

actually (equivalently in Maple),

V = (a*J - b*M)^(-1) . M . W;  # where J is the identity matrix.

Note that M must be square and V,W column vectors.
(If  a*J - b*M  is not invertible then the equation has not a unique solution.)

 

 

In general the minimization programs do not accept strict inequalties because often the min may not exist (e.g. min (x+y), subject to x>0, y>0).

Just omit the `<>` restrictions and then exclude `=` from solutions.

restart;
d:=2; R := [seq(rand(0.1 .. 0.15)(),1..30)]; timemax:=100;   # R := [0.1 $ 30]
#d:=3; R := [seq(rand(0.1 .. 0.15)(),1..60)]; timemax:=100;
S:=Array(1..1,{1 = [<0.,0>, 0.2]});
#S:=Array(1..1,{1 = [<0.,0.,0>, 0.2]});
####################################
NS:=numelems(S):
Xrnd := r -> LinearAlgebra:-RandomVector(d, generator=-1.+r .. 1.-r): 
nor:=LinearAlgebra:-VectorNorm:
check:=proc(v::Vector, r::positive)
  local w;
  for w in S do
    if nor(w[1]-v,2) < r + w[2] then return false fi
  od;
true;
end:

timelimit(timemax,
(for r in R do
  do v:=Xrnd(r) until check(v,r);
  S(++NS) := [v, r];
od)):

if   d=2 then plots:-display(seq( plottools:-disk([seq(s[1])],s[2], color=blue),s=S))
elif d=3 then plots:-display(seq( plottools:-sphere([seq(s[1])],s[2], style=patchnogrid),s=S))
else "cannot plot" fi;

 

 

 

Edit: added 3d plot

z > 0 means Re(z)>0, Im(z)=0. So,

sys:=[
-V^2 + N + P=0,
-(V^2 + N - P)^2 - 4*A*V^2>0,
g*(A*V^2 + N*V^2 - N*P)<0,  #g<>0
V>0, V<1,
N>0, P>0]:
SolveTools:-SemiAlgebraic(sys, [N, P, V, A]);

N :: posint ==> empty set.

 

Here the fact that odetest gives 0 must be undestood as: the solution is valid in some interval, but not necessarily everywhere.
(I met several such situations).

Actually, directly
eval(ode, sol);

is obviously false if lhs is <0,  e.g. _C1=0, x=Pi^2.

A more correct solution is obtained with:

Sol:=dsolve(ode, implicit);

 

The only problem is that your system may have no solution for alpha >= 0.1

Note that alpha=0, upsilon=anything is always a solution, and depending on data, this could be the only one.
To avoid alpha=0 simply replace {alpha = 0.001 .. infinity, upsilon = 0.1 .. infinity}; sometimes the solution will satisfy alpha>0.1

f := x -> exp(x/a)/(a*(1 + exp(x/a))^2):
int(f(x)*exp(-I*w*x), x = -infinity .. infinity):
IntegrationTools:-Change(%, exp(x)=y) assuming a>0;

         Pi*csch(Pi*a*w)*a*w

As stated it's trivial. Probably you have some other conditions.

solve({x^2 + y^2 + (z-3)^2 = 25, z = 0},  explicit);

 

The exact solution is possible, but I am sure you know this.

restart;
pde:=diff(u(x,t),t)=diff(u(x,t),x,x);
ibc := u(x,0)=1, u(0,t)=0, u(1,t)=0;
dsolu := pdsolve({pde,ibc});
U:=rhs(dsolu);
V:=diff(U,x);
plot(eval(V,x=0), t=0..0.5);

StringTools:-FormatTime("%X");
StringTools:-FormatTime("%Y-%m-%d %X");

 

You have again here an ode which has a factor not containing y'.

factor(lhs(ode) );
      2*(y(x)*x + 1)*(diff(y(x), x)*x + y(x))

I don't know why you do this, because in my opinion dsolve should not be given such arguments (unless you want to test something).
Anyway, dsolve seems to be fooled by it and gives twice the same general solution (_C1  ---> - _C1).
The singular solution y = -1/x  is from the first factor, which has nothing to do with the second (linear ODE) factor, so it is "essential";  only by (intentional?) coincidence, -1/x  is obtained for _C1 = 0.

 

You have again here an ode which has a factor not containing y'.

factor(lhs(ode) );
      2*(y(x)*x + 1)*(diff(y(x), x)*x + y(x))

I don't know why you do this, because in my opinion dsolve should not be given such arguments (unless you want to test something).
Anyway, dsolve seems to be fooled by it and gives twice the same general solution (_C1  ---> - _C1).
The singular solution y = -1/x  is from the first factor, which has nothing to do with the second (linear ODE) factor, so it is "essential";  only by (intentional?) coincidence, -1/x  is obtained for _C1 = 0.

 

Maybe an unusual phenomenon closely follows StudentT(13/3); why exclude it?
Even a dimension can be noninteger; see Sierpinski's triangle whose (Hausdorff) dimension is log[2](3).

First 49 50 51 52 53 54 55 Last Page 51 of 122