Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hello,

 

I have a complex set of non linear diff eqns in the form :

y1'' = f(y1',y1,y2'',y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4) ;

y2'' = f(y1'',y1',y1,y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4)

and so on ... y6''=(...)

As I want to resolve this coupled systeme in matlab using @ODE45... I wanted the equations in the form : y1''=f(y1',y1,y2',y2,....) and so on ... => X'[] = f(X[],U[])

 

How can I force maple to rearrange a system of coupled eqns with only the variables i want ?

 

I know this is possible beacause it is a nonlinear state space model but maple do not work with nonlinear state space model... It give me error when I tried to create statespace model with my non linear diff eqns.

 

Thanks a lot !

Wanting to edit a post of mine, I accidentally clicked the 'More'-button and chose 'Edit' on anothers post. I immediately saw that it was not my post, and did of course not alter it. But it left me somewhat shocked, for it would seem to imply that anyone can edit (and delete, as well, have just investigated that) anyones post(s). That I think is something that really needs to be remedied as soon as possible.

Hey

I have a very simple function and I need to plot it. The plot is however not smooth and there are annoying cuts and steps which don't go away no matter how I set the options. This problem has been puzzling me for a while and I really appreciate any help.

The followings are all the possible options I could find, none seems to work. You can take a look at this file: ploting_problem.mw

Thanks

I saw yesterday evening (at home) a very elegant answer to my question "Intersection of real intervals" .
Unfortunately I can't retrieve it this morning (I'm in the office)

It was something like  coulitbe('_x' ...) ... but I don't remember it entirely
I think it came from Carl Love or maybe Mac Dude

 Could you please send me it again ?

 

Thanks

Howdy all,

I am trying to create a solar system model by defining a force equation then using the sequence function to create a differential equation and then solving those differential equations using the initial conditions (in X,Y,Z coordinates). So far I have the code below.


m[1] = 1.989*10^30; m[2] = 3.301*10^23; m[3] = 4.867*10^24; m[4] = 5.972*10^24+7.346*10^22; m[5] = 6.417*10^23; m[6] = 1.899*10^27; m[7] = 5.685*10^26; m[8] = 8.682*10^25; m[9] = 1.024*10^26; m[10] = 1.471*10^22; m[11] = 9.3*10^20; m[12] = 2.6*10^20; m[13] = 2*10^20; m[14] = 8.67*10^19; m[15] = 3.9*10^19; mass := Matrix(15, 1, [1.989*10^30, 3.301*10^23, 4.867*10^24, 5.972*10^24+7.346*10^22, 6.417*10^23, 1.899*10^27, 5.685*10^26, 8.682*10^25, 1.024*10^26, 1.471*10^22, 9.3*10^20, 2.6*10^20, 2*10^20, 8.67*10^19, 3.9*10^19]); G := 6.67408*10^(-11)

mass := Vector(4, {(1) = ` 15 x 1 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

 

0.6674080000e-10

(1)

sqrt(sum(x[i](t)^2, i = 1 .. 3));

(x[1](t)^2+x[2](t)^2+x[3](t)^2)^(1/2)

 

proc (i, j) options operator, arrow; sqrt(sum((x[i, k](t)-x[j, k](t))^2, k = 1 .. 3)) end proc

 

((x[1, 1](t)-x[3, 1](t))^2+(x[1, 2](t)-x[3, 2](t))^2+(x[1, 3](t)-x[3, 3](t))^2)^(1/2)

 

proc (i, j) options operator, arrow; [x[j, 1](t)-x[i, 1](t), x[j, 2](t)-x[i, 2](t), x[j, 3](t)-x[i, 3](t)] end proc

 

[x[3, 1](t)-x[1, 1](t), x[3, 2](t)-x[1, 2](t), x[3, 3](t)-x[1, 3](t)]

 

x[3, 1](t)-x[1, 1](t)

 

x[j, 1](t)-x[i, 1](t), x[j, 2](t)-x[i, 2](t), x[j, 3](t)-x[i, 3](t)

 

proc (i, j) options operator, arrow; [seq(x[j, k](t)-x[i, k](t), k = 1 .. 3)] end proc

 

[x[3, 1](t)-x[1, 1](t), x[3, 2](t)-x[1, 2](t), x[3, 3](t)-x[1, 3](t)]

 

x[3, 1](t)-x[1, 1](t)

(2)

diff(x[0, 1](t), t, t) = force(0)[1]:

initialPositions := Matrix([[0, 0, 0], [-0.210e8, 0.426e8, 0.541e7], [0.106e9, -0.244e8, -0.644e7], [-0.139e9, -0.569e8, 0.316e4], [-0.177e9, -0.155e9, 0.111e7], [-0.802e9, 0.131e9, 0.174e8], [-0.480e9, -0.142e10, 0.438e8], [0.280e10, 0.103e10, -0.324e8], [0.420e10, -0.157e10, -0.645e8], [0.132e10, -0.477e10, 0.127e9], [0.431e9, -0.690e8, -0.816e8], [0.228e9, 0.305e9, -0.368e8], [0.300e9, -0.351e9, 0.217e9], [-0.434e9, -0.841e7, -0.284e8], [-0.115e9, -0.466e9, -0.612e8]])

initialPositions := Vector(4, {(1) = ` 15 x 3 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(3)

initialVelocities := Matrix([[0, 0, 0], [-0.462e7, -0.170e7, 0.285e6], [0.666e6, 0.293e7, 0.183e4], [0.936e6, -0.239e7, 83.3], [0.145e7, -0.140e7, -0.650e5], [-0.196e6, -0.106e7, 0.879e4], [0.745e6, -0.271e6, -0.250e5], [-0.208e6, 0.524e6, 0.467e4], [0.161e6, 0.442e6, -0.129e5], [0.463e6, 0.294e5, -0.137e6], [0.193e6, 0.143e7, 0.923e4], [-0.119e7, 0.974e6, 0.116e6], [0.978e6, 0.562e6, -0.470e6], [0.166e6, -0.156e7, -0.131e5], [0.132e7, -0.170e6, 0.395e6]])

initialVelocities := Vector(4, {(1) = ` 15 x 3 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(4)

ic1 := seq(seq(x[i, k](0) = initialPositions[i+1, k], k = 1 .. 3), i = 0 .. N-1); ic2 := seq(seq((D(x[i, k]))(0) = initialVelocities[i+1, k], k = 1 .. 3), i = 0 .. N-1); equations := {ic1, ic2, ode}; sol := dsolve(equations, numeric)

Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got {x[0, 1](0) = 0, x[0, 2](0) = 0, x[0, 3](0) = 0, x[1, 1](0) = -0.210e8, x[1, 2](0) = 0.426e8, x[1, 3](0) = 0.541e7, x[2, 1](0) = 0.106e9, x[2, 2](0) = -0.244e8, x[2, 3](0) = -0.644e7, x[3, 1](0) = -0.139e9, x[3, 2](0) = -0.569e8, x[3, 3](0) = 0.316e4, x[4, 1](0) = -0.177e9, x[4, 2](0) = -0.155e9, x[4, 3](0) = 0.111e7, x[5, 1](0) = -0.802e9, x[5, 2](0) = 0.131e9, x[5, 3](0) = 0.174e8, x[6, 1](0) = -0.480e9, x[6, 2](0) = -0.142e10, x[6, 3](0) = 0.438e8, x[7, 1](0) = 0.280e10, x[7, 2](0) = 0.103e10, x[7, 3](0) = -0.324e8, x[8, 1](0) = 0.420e10, x[8, 2](0) ...

 

plots[odeplot](sol, [x[1, 1](t), x[1, 2](t), x[1, 3](t)], t = 0 .. 20, numpoints = 1000, axes = normal)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

plots[odeplot](sol, [seq(x[1, k](t), k = 1 .. 3)], t = 0 .. 20, numpoints = 1000, axes = normal)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

plots[odeplot](sol, [seq([seq(x[i, k](t), k = 1 .. 3)], i = 0 .. N-1)], t = 0 .. 20, numpoints = 1000, axes = normal)

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

``


Download ass4.mw

Everything works fine until I try to execute the last line. When I do that I get an error that says "Error, in dsolve/numeric/process_input. invalid specifications of initial conditions.

At this point I am not sure if the problem lies in how I have defined my initial conditions or the way i've defined the force equation but I am open to any suggestions or ideas on where I should go from here.

Thanks in advance!

 

Nick

i use the pdsolve to find the solutions of a system of partial differential equations,

but the result contains some indefinite integrals, how to simplify it further?

thank you

code:

eq1 := {6*(diff(_xi[t](x, t, u), u))-3*(diff(_xi[x](x, t, u), u)), 12*(diff(_xi[t](x, t, u), u, u))-6*(diff(_xi[x](x, t, u), u, u)), 2*(diff(_xi[t](x, t, u), u, u, u))-(diff(_xi[x](x, t, u), u, u, u)), diff(_eta[u](x, t, u), t)+diff(_eta[u](x, t, u), x, x, x)+(diff(_eta[u](x, t, u), x))*u, 18*(diff(_xi[t](x, t, u), x, u))+3*(diff(_eta[u](x, t, u), u, u))-9*(diff(_xi[x](x, t, u), x, u)), 6*(diff(_xi[t](x, t, u), x, x))+3*(diff(_eta[u](x, t, u), x, u))-3*(diff(_xi[x](x, t, u), x, x)), 6*(diff(_xi[t](x, t, u), x, u, u))+diff(_eta[u](x, t, u), u, u, u)-3*(diff(_xi[x](x, t, u), x, u, u)), 12*(diff(_xi[t](x, t, u), u))-6*(diff(_xi[x](x, t, u), u))+6*(diff(_xi[t](x, t, u), x, x, u))-6*(diff(_xi[t](x, t, u), u))*u+3*u*(diff(_xi[x](x, t, u), u))-3*(diff(_xi[x](x, t, u), x, x, u))+3*(diff(_eta[u](x, t, u), x, u, u)), 12*(diff(_xi[t](x, t, u), x))-6*(diff(_xi[x](x, t, u), x))+2*(diff(_xi[t](x, t, u), t))+2*(diff(_xi[t](x, t, u), x, x, x))-4*(diff(_xi[t](x, t, u), x))*u+2*(diff(_xi[x](x, t, u), x))*u+_eta[u](x, t, u)-(diff(_xi[x](x, t, u), t))+3*(diff(_eta[u](x, t, u), x, x, u))-(diff(_xi[x](x, t, u), x, x, x))};

simplify(pdsolve(eq1))

 

I read in the net that the method used in pdsolve numeric is the theta method, my question: is it the most efficient with regard to rate of convergence of the numerical solution of the PDE?

If not then why is it used as the default method?

 

Thanks.

 

nullspace or reducedform or Eigenvectors still can not find eigenvector in terms of  mmm , how to find this?

 

mmm is a variable

Dear All, 

I am using the comand " export as" form the file menu to obatain a latex version of my worksheet. The generated latex file use a package called amplestd2e.sty that should be loaded for latex compiler to function proper. Do somebody know where to find it. Thank you. N. Jand 

I want to ask., I put delta as my constant in maple program and I want the answer are in delta as well., but the thing is., when running., it let delta=0, delta=-1, and delta=delta.,
the condition is we cannot let delta=1 or delta=0 because it is just same for s5 and s7.,.(delta is refer to the s8). How can I get answer as delta? with the condition? here I attach my maple programme..

 

> derivation := proc (A, n)
local i, j, k, t, s5, s7, s8, m, D,
sols5, sols7, sols8, eqns5, eqns7, eqns8,
BChange5, BChange7, BChange8; eqns5 := {}; eqns7 := {}; eqns8 := {};
D := matrix(n, n);
BChange5 := matrix(n, n); BChange7 := matrix(n, n); BChange8 := matrix(n, n);
for i to n do for j to n do for m to n do
s5 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+A[i, k, m]*D[k, j], k = 1 .. n));
s7 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+0*A[i, k, m]*D[k, j], k = 1 .. n));
s8 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+delta*A[i, k, m]*D[k, j], k = 1 .. n));
eqns5 := `union`(eqns5, {s5}); eqns7 := `union`(eqns7, {s7}); eqns8 := `union`(eqns8, {s8})
end do end do end do;
sols5 := [solve(eqns5)]; sols7 := [solve(eqns7)]; sols8 := [solve(eqns8)];
t := nops(sols5); t := nops(sols7); t := nops(sols8);
for i to t do for j to n do for k to n do
BChange5[k, j] := subs(sols5[i], D[k, j]);
BChange7[k, j] := subs(sols7[i], D[k, j]);
BChange8[k, j] := subs(sols8[i], D[k, j])
end do end do;
print("eqns≔", eqns5); print("sols:=", sols5); print("BChange5:=", BChange5);
print("eqns≔", eqns7); print("sols:=", sols7); print("BChange8:=", BChange7);
print("eqns≔", eqns8); print("sols:=", sols8); print("BChange8:=", BChange8)
end do end proc;

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);
> derivation(AS1, 2);

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);

> AS3 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (2, 1, 2) = 1]);
> derivation(AS3, 2);

> AS4 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (2, 2, 2) = 1]);
> derivation(AS4, 2);

> AS5 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1, (2, 1, 2) = 1]);
> derivation(AS5, 2);

> AS1 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (3, 1, 2) = 1]);
> derivation(AS1, 3);

> AS2 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (3, 1, 2) = alpha]);
> derivation(AS2, 3);

> AS3 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (1, 2, 3) = 1, (2, 1, 3) = 1]);
> derivation(AS3, 3);

> AS4 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (2, 3, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS4, 3);

> AS5 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 3, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS5, 3);

> AS6 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(3, 1, 2) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS6, 3);

> AS7 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 2, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS7, 3);

> AS8 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS8, 3);

> AS9 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS9, 3);

> AS10 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS10, 3);

> AS11 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (2, 3, 2) = 1, (3, 1, 2) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS11, 3);

> AS12 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS12, 3);

> AS13 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS13, 3);

> AS14 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS14, 3);

> AS15 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS15, 3);

> AS16 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS16, 3);

> AS17 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS17, 3);
>

Dear all

I have the following equaion

Eq := diff(phi(x, k), x, x)+(k^2+2*sech(x))*phi(x, k) = 0;
          
The solution is given by 

phi := (I*k-tanh(x))*exp(I*k*x)/(I*k-1);

My question : At what value of k is there a bound state and in this case can we give a simple form of the solution phi(x,k)

 

With best regards

 

How I can simulate control speed of car with sensor of speed, noise, feedback on maplesim?thanks

H2 := [a(t)*(diff(c(t), t))+b(t) = 100, a(t)*(diff(b(t), t))+c(t)*(diff(b(t), t)) = exp(t), a(t)*(diff(c(t), t))+a(t)*(diff(b(t), t))+b(t) = 90];
H1 := subs([diff(a(t),t)=a1,diff(b(t),t)=b1,diff(c(t),t)=c1], H2);
H := subs([a(t)=a0, b(t)=b0, c(t)=c0], H1);
ics := generate_ic(H, {a0=-2..2, b0=-2..2, c0=-2..2,a1 = -2 .. 2, b1 = -2 .. 2, c1 = -2 .. 2, t = 0, energy = 0}, 100);

 

Error, (in generate_ic) invalid input: `DEtools/generate_ic` expects its 1st argument, H, to be of type algebraic, but received [a0*c1+b0 = 100, a0*b1+c0*b1 = exp(t), a0*c1+a0*b1+b0 = 90]

This is my source code to perform several binary arithmetic and HUffman Compression

Freq := proc (s) options operator, arrow; map(proc (x) options operator, arrow; rhs(x) = lhs(x) end proc, {StringTools:-CharacterFrequencies(s)}) end proc; s := readstat("x will be assigned "); Fr := Freq(s);

algo
{1 = "a", 1 = "g", 1 = "l", 1 = "o"}

HuffmanTree := proc (s) options operator, arrow; if nops(s) <= 1 then rhs(s[]) else procname(`union`(s[3 .. -1], {lhs(s[1])+lhs(s[2]) = [rhs(s[1]), rhs(s[2])]})) end if end proc; HT := HuffmanTree(Fr);


[["a", "g"], ["l", "o"]]

HuffmanCoding := proc (s, p := "") if s::string then s = p else procname(s[1], cat(p, 0)), procname(s[2], cat(p, 1)) end if end proc; HC := HuffmanCoding(HT);

"a" = "00", "g" = "01", "l" = "10", "o" = "11"

C := table([HC]); b := cat(map(proc (x) options operator, arrow; C[x] end proc, StringTools:-Explode(s))[]);

"00100111"

# Begin the procedure with make string to integer
z := parse(b);

                                                                   100111    #Should be 00100111 after parsing

# Step 1:add 1 to z
binaryAdd := proc (z, y) options operator, arrow; convert(convert(z, decimal, 2)+convert(y, decimal, 2), binary) end proc;
z1 := binaryAdd(z, 1);


101000

# Step 2: Reverse the number from left to right
z2 := convert(z1, base, 10);

[0, 0, 0, 1, 0, 1]


z3 := (parse@cat@op)(z2);


                                                                101  #Should be 000101 after parsing

 # Step 3: Addition between the first secret key and the Huffman Code

randomize();

p := rand(0 .. 2^(length(z3)-2)):

rn := convert(p(), binary);

1

z4 := binaryAdd(z3, rn);

110

# Step 4:Obtain 2's complement

s := length(z4);

z5 := convert(z4, decimal, binary);

6

z6 := [Bits:-GetBits(-z5, -1 .. 0, bits = s)];

[0, 1, 0]

z7 :=(parse@cat@op)(z6);

                                                       10  # Should be 010 after passing

 

The Bold part is MAPLE answer. My problem for this MAPLE source code is the underlined answer  as I can't get the answer I need after I have my parsing of string or list. Do this problem can be solved or it is impossible to make the leading zero all the way of the process. I try to figure it out for several solution but it still the same results. Thus hope some experts or someone can help me solve it together. Appreciated if get solved.

Hi and thanks in advance

I have a function like

w=f(r) on the other hand

z=g(r) wher r is common between these two.

how i could plot w in term of z?

First 163 164 165 166 167 168 169 Last Page 165 of 334