Robert Israel

6522 Reputation

21 Badges

18 years, 183 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

You don't have enough information to determine X: an n x n matrix has n^2 degrees of freedom, and your equation a = X.b only takes care of n of them.  One solution, assuming of course that b is not the 0 vector, is X = c * a . b^%H where c = 1/(b^%H . b).  You can add to this any matrix with b in its null space.

You didn't say what k1 and k2 were.  I tried it with k1 = 2 and k2 = 1, and it works fine.  However, if you make k2 > k1, you'll run into trouble: the solution can't exist after S(t) hits 40000.  There's no good "way around" this: there's simply no way the solution can satisfy the differential equation.  The existence theorems for differential equations require continuity.

Actually, y' = -2*x*y/(1+x^2) is valid for 2D Maple input, and will get you

diff(y(x), x) = -2*x*y(x)/(1+x^2)

Single-stepping is only available for three tasks in the Student[Calculus1] package: differentiation, integration and limit.  You could use the debug facilities to step through what solve does, but you might not find it very enlightening.  Maple doesn't generally do things the same way people do them by hand.

See the help pages ?OpenMaple and ?OpenMaple,Java,Examples.

Google translates part of your question:

"how a variable TextField değeini atayabirim".

You might have better luck here if you wrote in English (or French, Spanish, Russian or maybe even Chinese).


For a parametric curve x = x(t), y = y(t), the radius of curvature is

(x'^2 + y'^2)^(3/2)/|x'*y'' - x''*y'|

You can try using finite differences to approximate the derivatives:
x'(n) ~ (x(n+1) - x(n-1))/2,
x''(n) ~ (x(n+1) + x(n-1) - 2*x(n))

and similarly for y' and y''.   I don't know about estimating upper and lower bounds, though.

> LinearAlgebra[BandMatrix]([
      [seq(a(i),i=1..5),0], [1,seq(b(i),i=1..5),1],[0, seq(c(i),i=1..5)]]);

Use select(Progressive, YourSet) or remove(Progressive, YourSet), depending on whether you want the ones where it returns true or the ones where it returns false.  Or use selectremove if you want both.

Something like this?

> map(p -> subs(zip(`=`,[a,b,c],p),f), C);

or perhaps more direct:

> map(L -> 4*L[1] + 2*L[2] + L[3], C);

The bug seems to be in UnderlyingGraph. 

> with(GraphTheory):
   G:= Digraph({[1,2],[2,4],[4,8]});

G := `Graph 1: a directed unweighted graph with 4 vertices and 3 arc(s)`

>  U:= UnderlyingGraph(G);

U := `Graph 2: an undirected unweighted graph with 4 vertices and 2 edge(s)`

The arc [4,8] of the digraph does not produce an edge in the underlying graph.
This is triggered by the fact that the name of the third vertex is 4.  It would not happen with Digraph({[1,2],[2,four],[four,8]}).  The problem is a confusion between names of vertices and numbers of vertices: in line 9 of UnderlyingGraph

        if V[i] <> j then

V[i] is the name of a vertex, and j is the number of a vertex.

I'm submitting an SCR.

A work-around is to use names rather than numbers to indicate the vertices.

Sorry, I should have remembered: equality of Vectors (and rtables in general) is not such a simple matter.  Conversion to lists would fix that.  Try this:

> n := nops(Set1);
  FirstThreeRowList :=
    [seq(sort(map(convert, [LinearAlgebra:-Row(Set1[i], 1 .. 3)], list)), i = 1 .. n)];
Uniq := select(
proc (i) local r; member(FirstThreeRowList[i], FirstThreeRowList, r); r = i end proc,
     [$1 .. n]);
Set2 := {seq(Set1[i], i = Uniq)};
Set3 := select(m -> (nops(map(convert,{LinearAlgebra:-Row(m, 1 .. 3)},list)) = 1), Set2);
Set4 := select(m -> (nops(map(convert,{LinearAlgebra:-Row(m, 1 .. 4)},list)) < 4), Set2);

You didn't give us the values of your constants.  I set them all to 1 and it worked.

> debc:= {-EM*iner*(diff(f(x), `$`(x, 4)))-(3/2)*EM*A*nonln*(diff(f(x), `$`(x, 2)))*(diff(f(x), `$`(x, 1)))^2+u*EM*A*nonln*(9*(diff(f(x), `$`(x, 1)))*(diff(f(x), `$`(x, 2)))*(diff(f(x), `$`(x, 3)))+3*(diff(f(x), `$`(x, 2)))^3+(3/2)*(diff(f(x), `$`(x, 1)))^2*(diff(f(x), `$`(x, 4)))) = -q, f(0) = 0, f(l) = 0, (D(D(f)))(l) = -q*u/(EM*iner), (D(D(f)))(0) = -q*u/(EM*iner)};
> case1:= subs({EM=1,A=1,nonln=1,u=1,q=1,iner=1,l=1},debc);
   plots[odeplot](dsolve(case1, numeric), x=0..1);

But it's quite possible that for some values of the parameters there is no solution.  That may be the cause of "Newton iteration is not converging".  Or perhaps, if there is a solution, the approxsoln or continuation options might help.  See the help page
?dsolve,numeric,BVP

Set4:= select(m -> (nops({LinearAlgebra:-Row(m,1..4)}) < 4), YourSetOfMatrices);

1. 

> divbygcd:= M -> M/igcd(op(convert(M,set)));
  Set1:= map(divbygcd, YourSetOfMatrices);

2.

> n:= nops(YourSetOfMatrices);
   FirstThreeRowList:= [seq({LinearAlgebra:-Row(YourSetOfMatrices[i],1..3)},
       i=1..n)];
   Uniq:= select(
      proc(i) local r; member(FirstThreeRowList[i], FirstThreeRowList, r); r=i end proc,
     [$1..n]);
   Set2:= seq(YourSetOfMatrices[i], i=Uniq)};

3. 

> Set3:= select(m -> (nops({LinearAlgebra:-Row(m,1..3)})=1), YourSetOfMatrices);

4.  What do you mean by "similar"?

5.  If A and B are sets, A minus B is the set of members of A that are not members of B.

First 17 18 19 20 21 22 23 Last Page 19 of 138