Kitonum

20234 Reputation

26 Badges

15 years, 322 days

MaplePrimes Activity


These are answers submitted by Kitonum

I don't think your boundary value problem can be solved exactly, probably only numerically. To do this, I gave some numerical values ​​to all the parameters. Maple also does not accept a value at infinity as a boundary value. I replaced infinity with the number 50. You yourself can take as infinity some number that for your task is reasonable to take as infinity.

restart

with(plots)

OdeSys := D1*(diff(U0(y), y, y))+A*S*(diff(U0(y), y))-(M1+D1/K)*U0(y)+B*G1*Theta0(y) = 0, D1*(diff(U1(y), y, y))+A*S*(diff(U1(y), y))-(M1+D1/K+A*i*omega)*U1(y)+B*G1*Theta0(y) = 0, E1*(diff(Theta0(y), y, y))+Pr*S*C*(diff(Theta0(y), y))-F*Theta0(y)+Du*(diff(Phi0(y), y, y))+Pr*C*QL*Phi0(y) = 0, E1*(diff(Theta1(y), y, y))+Pr*S*C*(diff(Theta1(y), y))-F*Pr*C*i*omega*Theta1(y)+Du*(diff(Phi1(y), y, y))+Pr*C*QL*Phi1(y) = 0, diff(Phi0(y), y, y)+S*Sc*(diff(Phi0(y), y))-Kr*Sc*Phi0(y) = 0, diff(Phi1(y), y, y)+S*Sc*(diff(Phi1(y), y))-(i*omega+Kr)*Sc*Phi1(y) = 0; OdeSys1 := eval({OdeSys}, [A = 1, B = 2, C = 3, D1 = 4, Du = -1, E1 = -2, F = -3, G1 = -4, K = 5, Kr = 1, M1 = 2, Pr = 3, QL = 4, S = 5, Sc = 6, i = 1.5, omega = .5]); Cond := {Phi0(0) = 1, Phi0(50) = 0, Phi1(0) = 1, Phi1(50) = 0, Theta0(0) = 1, Theta0(50) = 0, Theta1(0) = 1, Theta1(50) = 0, U0(0) = 1, U0(50) = 0, U1(0) = 0, U1(50) = 0}

{diff(diff(Phi0(y), y), y)+30*(diff(Phi0(y), y))-6*Phi0(y) = 0, diff(diff(Phi1(y), y), y)+30*(diff(Phi1(y), y))-10.50*Phi1(y) = 0, 4*(diff(diff(U0(y), y), y))+5*(diff(U0(y), y))-(14/5)*U0(y)-8*Theta0(y) = 0, 4*(diff(diff(U1(y), y), y))+5*(diff(U1(y), y))-3.550000000*U1(y)-8*Theta0(y) = 0, -2*(diff(diff(Theta0(y), y), y))+45*(diff(Theta0(y), y))+3*Theta0(y)-(diff(diff(Phi0(y), y), y))+36*Phi0(y) = 0, -2*(diff(diff(Theta1(y), y), y))+45*(diff(Theta1(y), y))+20.25*Theta1(y)-(diff(diff(Phi1(y), y), y))+36*Phi1(y) = 0}

 

{Phi0(0) = 1, Phi0(50) = 0, Phi1(0) = 1, Phi1(50) = 0, Theta0(0) = 1, Theta0(50) = 0, Theta1(0) = 1, Theta1(50) = 0, U0(0) = 1, U0(50) = 0, U1(0) = 0, U1(50) = 0}

(1)

solutions := dsolve(`union`(OdeSys1, Cond), numeric, maxmesh = 10000)

odeplot(solutions, [[y, U0(y)], [y, U1(y)], [y, Phi0(y)], [y, Phi1(y)], [y, Theta0(y)], [y, Theta1(y)]], y = 0 .. 50, color = [red, blue, green, yellow, gold, cyan], axes = box, size = [1000, 400])

 
 

 

NULL

Download ode_exact_new.mw

Here are 2 solutions - numerical and symbolic. The  extrema command acknowledges the symbolic answer that was first received by the  identify  command:

restart;
with(geom3d):
point(A,0,0,4): point(B,6,-2,6): point(C,4,-8,4): v:=[1,-1,2]:
point(M,x,y,z):
line(d,[C,v]):
f:=distance(M,d);
v1:=<0,0,4>-<x,y,z>: v2:=<6,-2,6>-<x,y,z>:
p:=v1.v2 assuming real;
 Optimization:-Minimize(f, {x^2 + (y - 2)^2 + (z + 1)^2 = 29, p=0}); # Numerical solution
identify(evalf(%)); # Symbolic solution
extrema(f, {x^2 + (y - 2)^2 + (z + 1)^2 = 29, p=0}, {x,y,z}, s);
s;

 

The  P  procedure solves your problem:

restart;

P:=proc(Eq)
local Eq1;
Eq1:=(lhs-rhs)(Eq)=0;
select(t->has(t,diff),lhs(Eq1))=-sort(remove(t->has(t,diff),lhs(Eq1)));
end proc:

Eq:=diff(u(x, t), t, t) + 3 + 2*diff(u(x, t), t) + 4*t + x^2 + x^3/3 + diff(u(x, t), t, x, x) + diff(u(x, t), x, x, x, x) = x*t^2;

P(Eq);

   

 

 

@JAMET  You wrote "I wish to write the following in this order (for instance)
<2275,3648,4275>,<975,448,1273>,<275,252,373>,<33,56,65>,<15,8,17>,<3,4,5> Is it possible ?" 

You made a mistake - the first and second triplets are not Pythagorean. I fixed it. The procedure   FromLargestToSmallest  solves your problem:

restart;
FromLargestToSmallest:=proc(t::Vector)
local L, M1, M2, M3, A1, A2, A3, t1, k, r, R;
uses LinearAlgebra;
if t[1]^2+t[2]^2 <> t[3]^2 then error `The actual procedure argument is not a Pythagorean triple` fi;
M1, M2, M3 := <1,-2,2;2,-1,2;2,-2,3>, <1,2,2;2,1,2;2,2,3>, <-1,2,2;-2,1,2;-2,2,3>;
A1, A2, A3 := ([M1,M2,M3]^~(-1))[];
t1:=t; L[1]:=t1; k:=1;
while not Equal(t1,<3,4,5>) do
R:=[A1.t1,A2.t1,A3.t1];
for r in R do
if r[1]>0 and r[2]>0 and r[3]>0 then k:=k+1; L[k]:=r; t1:=r fi;
od;  od;
convert(L,list)[];
end proc:


Examples of use:

FromLargestToSmallest(<2275,3648,4275>);
FromLargestToSmallest(<2225, 3648, 4273>);

     

 

restart;
with(plots):
F:=(x,y)->x^3-4*x*y+2*y^3:
Curve:=plots:-implicitplot(F(x,y), x=-3..3, y=-3..3, color=red, thickness=2, gridrefine=3, scaling=constrained):
Y:= [fsolve(F(1,y))]; # The list of y-values
G:=unapply(implicitdiff(F(x,y), y, x), x, y);
L:=[seq(G(1,Y[i]),i=1..3)]; # The list of derivatives at the points [1,Y[i]]
T:=[seq(Y[i]+L[i]*(x-1), i=1..3)]; # The list of tangents
Tangents:=plot(T, x=-0.1..2, color=blue):
Points:=pointplot([seq([1,Y[i]], i=1..3)], symbol=solidcircle, color=blue, symbolsize=9):
Names:=textplot([[1,Y[1],A],[1,Y[2],B],[1,Y[3],C]], font=[times,18],align=above):
plots:-display(Curve,Tangents,Points,Names, size=[800,400]);

       

 

 

Here is a direct calculation of the distance between two lines, using no packages, but only Maple kernel commands. We find this distance as the length of a segment connecting 2 points on these lines, and the segment must be perpendicular to each of the lines. I think this approach is useful for understanding what exactly is the distance between 2 lines:

restart;
A := <0, 0, 0>:
B := <a, 0, 0>:
C := <a, a, 0>:
DD := <0, a, 0>:
S := <0, 0, h>:
v1:=C-A; v2:=DD-S; # Direction vectors of the first and second lines 
X1:=A+s*v1; # Arbitrary point on the first line
X2:=S+t*v2; # Arbitrary point on the second line
u:=X1-X2; # Vector connecting points X1 and X2
Sol:=solve({v1.u=0, v2.u=0}, {s,t}) assuming positive;
simplify(eval(sqrt(u.u), Sol)) assuming positive;

 

Will this be what you want:

restart;
S__x := sin(r__a):
S__y := cos(r__a):
S__z := sin(r__a):
lower_limit := 0: upper_limit := 10: step_size := .3: num_steps := ceil((upper_limit-lower_limit)/step_size): r_values := [seq(i*step_size+lower_limit, i = 0 .. num_steps)]:
                      
arrows := [seq(plots:-arrow([0, 0, r__a], [S__x(r__a), S__y(r__a), S__z(r__a)], color = blue), r__a in r_values)]:

plots:-display(arrows, axes = normal);

 

restart;
phi := proc(k,x,L)
  if (type(k,even)) then sqrt(2)*sin(Pi*k*x/L)/sqrt(L)
  else sqrt(2)*cos(Pi*k*x/L)/sqrt(L)
  end if;
end proc:
 	
A:=Int(phi(m,x,L)*_h^2/m2*diff(phi(n,x,L),x,x),x=-L/2..L/2);
value(A) assuming m::posint,n::posint,m=n;
value(A) assuming m::posint,n::posint,m<>n;

        

We place point  A  at the origin of coordinates, point  B  on the axis  Ox  to the right of  A , points C and   lie in the upper half-plane. We introduce 2 unknowns: s - the angle between the axis  Ox  and AD, t - the angle between the axis  Ox  and  BC. We use vectors for calculations. We find s  and  t  numerically by solving a system of 2 equations with 2 unknowns:

restart;
with(plottools): with(plots): 
local D:
Dist:=(X,Y)->sqrt((X[1]-Y[1])^2+(X[2]-Y[2])^2):
Angle:=(U,V)->arccos((U.V)/sqrt(U.U)/sqrt(V.V)):
A:=<0,0>: B:=<170,0>: C:=<170+170*cos(t),170*sin(t)>: D:=<180*cos(s),180*sin(s)>:
Sys:={Dist(C,D)=290,Dist(A,C)=Dist(B,D)};
Sol:=fsolve(Sys, {s=0..Pi,t=0..Pi});
C:=eval(C, Sol): D:=eval(D, Sol):
P:=curve(convert~([A,B,C,D,A],list), color=red, thickness=2):
T:=textplot([[convert(A,list)[],"A"],[convert(B,list)[],"B"],[convert(C,list)[],"C"],[convert(D,list)[],"D"]], font=[times,bold,18], align={left, above}):
display(P,T, scaling=constrained);
DA:=A-D: DC:=C-D: CD:=-DC: CB:=B-C:
eval(s,Sol); # Angle A
eval(Pi-t,Sol); # Angle B
Angle(DA,DC);  # Angle D
Angle(CD,CB);  # Angle C

     

If a mapping of finite-dimensional spaces is given, then the total derivative is understood as the Jacobian, represented by a matrix consisting of partial derivatives. In the case of a real-valued function, this will be a row matrix. The total differential is obtained by multiplying this matrix by the column vector of differentials of the independent variables.

restart;
# The case of a real-valued function of two variables
M:=Student:-MultivariateCalculus:-Jacobian([f(x,y)],[x,y]);
(M.<dx,dy>)[1];

u:=t(x,y)-s(x,y): # Your example
M:=Student:-MultivariateCalculus:-Jacobian([u],[x,y]);
(M.<dx,dy>)[1];

                  

 

 

I don't know any other way than using the combination of  algsubs  with expand  (if needed).

Example:

restart;
Expr:=cos(x)^4:
expand(algsubs(cos(x)^2=1-sin(x)^2, Expr));

                         

Use the  evalc  command for this. Unfortunately, the result is very cumbersome, because your equation contains many parameters:

restart;

expand((a+I*b)*(a-I*b));
(a+I*b)+(a-I*b);
# z = x *Iy    I need to seperate out solution to [x,y] & [x,-y]
#https://math.stackexchange.com/questions/44391/foci-of-a-general-conic-equation
eq := T*z^2 - (R + S*I)*z +G-K + H*I;
sol:=solve(eq,z);
sol1,sol2:=evalc~([%])[];
expand(sol1*sol2)=a^2+b^2;
simplify(sol1+sol2=2*a);
simplify(sol1-sol2=2*b);


Edited.

There is no need for a triple integral here. Let us consider the section of this torus by the plane  y=0 . We see that the torus is obtained by rotating the circle  (x - 4)^2 + z^2 = 4  around the axis  Oz . Using the well-known formula for the volume of a body of rotation, we get the answer  V=32*Pi^2 :

restart;
Eq:=(x^2+y^2+z^2+12)^2=64*(x^2+y^2):
plots:-implicitplot3d(Eq, x=-6.7..6.7, y=-6.7..6.7,z=-2.7..2.7, style=surface, axes=normal, numpoints=100000, scaling=constrained);
factor((lhs-rhs)(eval(Eq,y=0)));
Student:-Precalculus:-CompleteSquare(op(1,%),[x,y]);
f1,f2:=solve(%, x);
V=simplify(Pi*int(f1^2,z=-2..2)-Pi*int(f2^2,z=-2..2));

                     

 

restart;
expr:= 4*cos(Pi*m)/(Pi*(2*m + 1)); 
simplify(%) assuming m::integer;
``;
4*cos(Pi*m+a)/(Pi*(2*m + 1));
expand(%) assuming m::integer;
``;
4*cos(Pi*m+2*alpha*Pi)/(Pi*(2*m + 1));
expand(%) assuming integer;


                                             

Explanation. If alpha is an arbitrary real number, then  2*alpha*Pi  will also be an arbitrary real number. Therefore, I immediately replaced this in the code with the symbol  , then to simplify we will not need additional commands. If  alpha  is an integer, then due to the periodicity of the cosine, the result coincides with example 1. 

Code in Maple 2018.

Edited.

restart;
h:=(t,x)->(m*t^2 + 6*t - 2*x)^2/(36*g*t^2):
t:=<1,5,10,15,20>:
V:=h~(t,x);
V[1], V[3];

                         

 

1 2 3 4 5 6 7 Last Page 1 of 281