Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

There is no automatic way of telling whether a surface is ruled.  A sufficient (but not necessary) condition is that the surface is parametrized as x(u,v) = α(u) + v β(u), where α and β are vector-valued functions. 

As to "dispersion parameter" and "throat line",  its seems that you are referring to what are called the "distribution parameter" and the "striction curve" in English. They are calculated in a straightforward way, but you need to provide a specific x(u,v) in order to carry out the calculations.

It can't tell why you have "differential equation" in the title since the answers to your questions do not involve differential equations.  But perhaps I have misunderstood you.

From the error messages that you have shown, it looks to me that your java is running out of memory.  I recall having encountered that in memory-consuming applications.  For that reason, I have aliased my Maple command to expand to "maple -j 65536"  (the default is "-j 512").  I believe that should solve your problem.

The problem occurs much earlier, in T__v_x .  Your code assumes that T__v_x captures the return value of fsolve and then happily moves ahead with the rest of the calculation.  But what if fsolve returns no solution?

I suggest that you set x__k=1000, as it is what you seem to want to do, then execute the statements of the worksheet one at a time and see where the failure occurs.

 

restart;

with(plots):

with(plottools):

n := 3;  # the number of horizontal intervals,  indexed by i

3

m := 4;  # the number of vertical intervals, indexed by j

4

xmin, xmax := 1, 9;

1, 9

ymin, ymax := 2, 8;

2, 8

# a[i,j] holds the coordinate pair of the node (i,j);

a := Array(0..n+1, 0..m+1, (i,j) -> [ (n-i)/n*xmin + i/n*xmax,  (m-j)/m*ymin + j/m*ymax ] );

`Array(0..4, 0..5, {(0, 2) = [9, 2], (0, 3) = [\`/\`(19, 3), \`/\`(7, 2)], (0, 4) = [\`/\`(11, 3), 5], (0, 5) = [1, \`/\`(13, 2)], (1, 1) = [1, 2], (1, 2) = [\`/\`(35, 3), 2], (1, 3) = [9, \`/\`(7, 2)], (1, 4) = [\`/\`(19, 3), 5], (1, 5) = [\`/\`(11, 3), \`/\`(13, 2)], (2, 1) = [\`/\`(11, 3), 2], (2, 2) = [1, \`/\`(7, 2)], (2, 3) = [\`/\`(35, 3), \`/\`(7, 2)], (2, 4) = [9, 5], (2, 5) = [\`/\`(19, 3), \`/\`(13, 2)], (3, 1) = [\`/\`(19, 3), 2], (3, 2) = [\`/\`(11, 3), \`/\`(7, 2)], (3, 3) = [1, 5], (3, 4) = [\`/\`(35, 3), 5], (3, 5) = [9, \`/\`(13, 2)], (4, 1) = [9, 2], (4, 2) = [\`/\`(19, 3), \`/\`(7, 2)], (4, 3) = [\`/\`(11, 3), 5], (4, 4) = [1, \`/\`(13, 2)], (4, 5) = [\`/\`(35, 3), \`/\`(13, 2)]})`

display(
        seq(line(a[i,0], a[i,m]), i=1..n-1),  # sequence of vertical lines
        seq(line(a[0,j], a[n,j]), j=1..m-1),  # sequence of horizontal lines
        seq(seq(pointplot(a[i,j], symbol=solidcircle, symbolsize=15, color="Blue"), i=0..n), j=0..m),
        seq(seq(textplot([seq(a[i,j]), typeset(a[i,j])], align={above,right}, font=['helvetical', 'bold', 13]), i=0..n), j=0..m),
        rectangle(a[0,0], a[n,m], style=line, color=red),
scaling=constrained, size=[800,600], view=[0..xmax, 0..ymax]);

 

 
 

Download mw.mw

 

If you are interested in calculating the area enclosed by one loop of your data set, then do the following which is a consequence of Green's Theorem in multivariable calculus.

Let (xi,yi), i=1,2,…,n be the coordinates of the points that form one loop of your graph.  Then the enclosed area. A, is obtained from

2A = (x1y2 − x2y1) + (x2y3 − x3y2) + … + (xn-1yn − xnyn-1) + (xny1 − x1yn).

 

Change the line

diff(Q(x, t), t $ 5) = solve(ni, diff(Q(x, t), t $ 5))

to

eq := diff(Q(x, t), t $ 5) = solve(ni, diff(Q(x, t), t $ 5));

Then where you do

r := subs(diff(Q(x,t), t $5), k);

do this instead:

r := subs(eq, k);   # I think this is what you meant to do

The error goes away.  Then you are on your own for what to do with the result.

Your system of equations involves the second derivative of psi, so you need two conditions on psi, as you have prescribed.  Your system also involves the first derivatives of x and y, so you may specify x(0) and y(0), and that will yield a unique solution of the system.  You cannot arbitrarily specify extra conditions at x(1) and y(1) since in general they will conflict with the system's unique solution.

Aside: You didn't say that, but I suspect that you want to take the parameters t, r, d as unknowns which are to be determined along with the solution of the system. If that's the case, then there is a chance that a numerical solution may be found, however three parameters are too many.  You would want only two of the parameters t, r, d as unknowns, and the third one specified with a numerical value.

 

restart;
with(plots):
a := (k,p) -> (100-p)*exp(-k/2):
pvals := [0, 50, 100, 150, 200]:
colors := [blue, red, green, magenta, cyan]:
display(seq(pointplot([seq([k,a(k,p)], k=0..10)]), p in pvals),
    symbol=solidcircle, symbolsize=15, color=colors, legend=pvals);

 

I have no idea what you mean by a "composite function".

There is nothing like that in your equation.

 

As to your equation, you can solve it by hand.  You don't need Maple for it.

Begin with observing that ("abs(W)())^(2)" is the same as W^2.  So in your equation

test := abs(diff(u(x, t), x)+diff(u(x, t), t))^2 = abs(diff(u(x, t), x))^2+abs(diff(u(x, t), t))^2

abs(diff(u(x, t), x)+diff(u(x, t), t))^2 = abs(diff(u(x, t), x))^2+abs(diff(u(x, t), t))^2

drop the absolute values and get:

test := (diff(u(x, t), x)+diff(u(x, t), t))^2 = (diff(u(x, t), x))^2+(diff(u(x, t), t))^2

(diff(u(x, t), x)+diff(u(x, t), t))^2 = (diff(u(x, t), x))^2+(diff(u(x, t), t))^2

Expand the left-hand side and cancel the common terms.  Your equation reduces to

test := 2*(diff(u(x, t), x))*(diff(u(x, t), t)) = 0

2*(diff(u(x, t), x))*(diff(u(x, t), t)) = 0

We conclude that the solution of your PDE is either u(x, t) = f(x) or "u(x,t)=g(t),"
where f and g can be anything.

Download Partial_Differential_Equations_of_Composite_Functions-with-solution.mw

Your question makes sence if x is the entire real line, and the solution and its derivatives vanish at infinity.  We cannot have real infinities in a numerical calculation, so here I am take a largish x interval and impose the vanishing conditions at the interval's endpoints.

restart;

pde := diff(u(x,t),t) + diff(u(x,t),x$3) = 0;

diff(u(x, t), t)+diff(diff(diff(u(x, t), x), x), x) = 0

ibc := u(x,0)=f(x), u(a,t)=f(a), u(b,t)=f(b), D[1](u)(b,t)=D(f)(b);

u(x, 0) = f(x), u(a, t) = f(a), u(b, t) = f(b), (D[1](u))(b, t) = (D(f))(b)

a, b := -30, 10;

-30, 10

f := x -> 2/cosh(x)^2;

proc (x) options operator, arrow; 2/cosh(x)^2 end proc

pdsol := pdsolve(pde,{ibc}, numeric, spacestep=1e-2);

_m140290941899936

pdsol:-animate(t=0..1, frames=30);

Download mw.mw

What you have given as the "expected result" is not correct. Here is what you should get:

restart;

with(LinearAlgebra):

doit := proc(A::Matrix)
        local Q, R;
        Q, R := QRDecomposition(A, fullspan);
        return R . Q;
end proc:

A[0] := Matrix(  [[3.0, 1.0, 4.0], [1.0, 2.0, 2.0], [0., 13.0, 2]] );

Matrix(3, 3, {(1, 1) = 3.0000000000, (1, 2) = 1.0000000000, (1, 3) = 4.0000000000, (2, 1) = 1.0000000000, (2, 2) = 2.0000000000, (2, 3) = 2.0000000000, (3, 1) = 0., (3, 2) = 13.0000000000, (3, 3) = 2})

for i from 1 to 6 do
        A[i] := doit(A[i-1]);
end do;

Matrix(3, 3, {(1, 1) = 3.5000000000, (1, 2) = 4.4551702856, (1, 3) = -0.38180177416e-1, (2, 1) = 4.1412558482, (2, 2) = 3.5466472303, (2, 3) = 12.0839572279, (3, 1) = 0., (3, 2) = .38352988531, (3, 3) = -0.46647230321e-1})

Matrix(3, 3, {(1, 1) = 7.7653061224, (1, 2) = -3.5051266356, (1, 3) = -8.5280146144, (2, 1) = -.89936886875, (2, 2) = -3.1345831016, (2, 3) = -6.7655727021, (3, 1) = 0., (3, 2) = .81618126365, (3, 3) = 2.3692769792})

Matrix(3, 3, {(1, 1) = 8.1244016476, (1, 2) = -.40507893145, (1, 3) = 7.9914478264, (2, 1) = .41538662602, (2, 2) = -1.6766201724, (2, 3) = 8.6407060706, (3, 1) = 0., (3, 2) = .12815076053, (3, 3) = .55221852481})

Matrix(3, 3, {(1, 1) = 8.0993732348, (1, 2) = -1.5529006707, (1, 3) = -8.3271445271, (2, 1) = -0.84696189481e-1, (2, 2) = -2.2815760830, (2, 3) = -8.0017846681, (3, 1) = 0., (3, 2) = 0.91610146538e-1, (3, 3) = 1.1822028481})

Matrix(3, 3, {(1, 1) = 8.1153608751, (1, 2) = -1.1146392649, (1, 3) = 8.2940086384, (2, 1) = 0.24045008835e-1, (2, 2) = -1.9737094365, (2, 3) = 8.2142484334, (3, 1) = 0., (3, 2) = 0.34222832520e-1, (3, 3) = .85834856143})

Matrix(%id = 36893628848063747244)

Approximate eigenvalues

sort(Diagonal(A[i-1]));

Vector(3, {(1) = -2.1123294319, (2) = 1.0002884200, (3) = 8.1120410119})

Precise eigenvalues

Eigenvalues(A[0]);

Vector(3, {(1) = -2.0669460973+0.*I, (2) = .95415900373+0.*I, (3) = 8.1127870936+0.*I})

Download mw.mw

plot([seq(x+k, k=1..1.5, 0.1)], x=0..1, view=0..3);

 

dsol := dsolve({sys, ics}, numeric);
plots:-odeplot(dsol, [[t,x(t)],[t,y(t)],[t,z(t)]],
    t=0..0.005, color=[red,green,blue]);

restart;

 

Variables

 

A := 3;

3

B := 4;

4

 

 

Process 1

 

process1 := proc(x)
  return x^2*(A + B);
end proc:

 

Process 2

 

process2 := proc(x)
  return x^2*(A - B);
end proc:

 

 

Main

 

if A > B then
  process1(10);
else
  process2(12);
end if;

-144

 

Download mw.mw

 

Here is the translation into Maple of your hand-written solution.

restart;

System of equations (1)

eq1 := x__a = 1 + 2*t__1;
eq2 := y__a = t__1;
eq3 := z__a = -3 - 2*t__1;

x__a = 1+2*t__1

y__a = t__1

z__a = -3-2*t__1

System of equations (2)

eq4 := x__b = 1 - t__2;
eq5 := y__b = t__2;
eq6 := z__b = 3 + 2*t__2;

x__b = 1-t__2

y__b = t__2

z__b = 3+2*t__2

System of equations (3)

eq7 := x__a - 1 = K*(x__b - 1);
eq8 := y__a + 2 = K*(y__b + 2);
eq9 := z__a - 3 = K*(z__b - 3);

x__a-1 = K*(x__b-1)

y__a+2 = K*(y__b+2)

z__a-3 = K*(z__b-3)

Solve nine equations for nine unknowns

sol := solve({eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9}, {K, t__1, t__2, x__a, x__b, y__a, y__b, z__a, z__b});

{K = 11/2, t__1 = 3, t__2 = -12/11, x__a = 7, x__b = 23/11, y__a = 3, y__b = -12/11, z__a = -9, z__b = 9/11}

 

Download mw.mw

First 11 12 13 14 15 16 17 Last Page 13 of 58