Kitonum

21435 Reputation

26 Badges

17 years, 24 days

MaplePrimes Activity


These are answers submitted by Kitonum

Eq:=a^(5/2)*s^2*(D(f))(eta)^2*sqrt(nu)/(R*sqrt(a)*sqrt(nu)+eta*nu) = a^(5/2)*s^2*(D(P(s, eta*sqrt(nu)/sqrt(a))))(eta)/sqrt(nu);
Term:=select(has,rhs(Eq),P);
solve(Eq, Term);

             

       

It's better to implement  this as a procedure so that  Digits  is set automatically:

restart;
Evalf:=proc(x::realcons,n::posint)
local m;
m:=ilog10(evalf(x));
Digits:=m+n+3;
printf(cat("%.",n,f),x);
end proc:

Examples of use:

Evalf(123456789/123,6);
``;
Evalf(123456789/123,15);
``;
Evalf(Pi,3);

     

 

If I understood everything correctly, then your surfaces can be plotted according to the following scheme:
1. We define the parametric equations of the curve:  x = R*cos(phi),  y = a - R*(1 - sin(phi)) (phi is the parameter) in the plane  xOy , setting the corresponding constants  a  and  R .
2. Both surfaces are obtained by rotating these curves around the axis  Ox .

In the picture in 3D below, the orientation of the axes  x, y, z  roughly matches your original drawing ( x  is down, y  is back, z  is right):

 

restart;
a:=3: R:=8:  # For the curve A 
a1:=2: R1:=-8:  # For the curve B
x:=R*cos(phi); y:=a-R*(1-sin(phi)); x1:=R1*cos(phi); y1:=a1-R1*(1-sin(phi));
A:=plot([x, y, phi=Pi/3..2*Pi/3], title="The plot A"):
B:=plot([x1, y1, phi=Pi/3..2*Pi/3], title="The plot B"):
plots:-display(< A | B >, scaling=constrained, view=[-4..4,-4..4], labels=["x","y"], labelfont=[times,bold,16], titlefont=[times,16]);

         


 

A1:=plot3d([x,y*cos(alpha),y*sin(alpha)], phi=Pi/3..2*Pi/3, alpha=0..2*Pi, axes=normal, title="The plot A1"):
B1:=plot3d([x1,y1*cos(alpha),y1*sin(alpha)], phi=Pi/3..2*Pi/3, alpha=0..2*Pi, axes=normal, title="The plot B1"):
plots:-display(< A1 | B1 >, scaling=constrained, view=[-4.5..4.5,-4.5..4.5,-4.5..6.5], labels=["x","y","z"], labelfont=[times,bold,16], titlefont=[times,16],  orientation=[-10,-3,70]);

    

 

As an addition - animation of  A1 :

plots:-animate(plot3d,[[x,y*cos(alpha),y*sin(alpha)], phi=Pi/3..2*Pi/3, alpha=0..'a', axes=normal], 'a'=0..-2*Pi, frames=90, scaling=constrained, view=[-4.5..4.5,-4.5..4.5,-4.5..4.5], labels=["x","y","z"], labelfont=[times,bold,16], orientation=[-10,-3,70]);

                                     

 

You can use the  subs  command if you notice that  Zs / Z_AB = K_S  is equivalent to  Zs=Z_AB*K_S :

restart;
eq_5 := x = -(K_i*Zs - Z_AB - Zs)/(K_i*Z_AB);
eq_5_m5 := x = expand(rhs(eq_5));
eq_5_m6 := x = subs(Zs=Z_AB*K_S, rhs(eq_5_m5 ));

                          

 

I usually use the following way:

restart;
u:=<-2+m,3+m>;

u:=eval(u, m=5);
# or
u1:=eval(u, m=5);

 

Such equations are easily reducible to ordinary differential equations with derivatives. In the example below, we solve the equation  p*dx-q*dy=1/2*d(y^2-x^2)  by taking  p=3, q=2  and plotting several integral curves and 2 asymptotes:

restart;
d:=z->diff(z,x)*dx:
p:=3: q:=2:
p*d(y(x))-q*dx=1/2*d(y(x)^2-x^2);
dsolve(%);
plot([seq(eval(y(x),%[1]),_C1=-8..3),seq(eval(y(x),%[2]),_C1=-8..3),-(x-2)+3,x-2+3], x=-4..8, color=[green$24,red$2], scaling=constrained);

                 

 

restart;
S := proc(n) 
local i, s;
uses NumberTheory;
s:=0; 
for i to n do 
if i in Divisors(n) and type(n/i, odd) then s:=s+i end if; 
end do;
s;
end proc:

# Example
S(12);

                                                  16

The code below can be made more automatic, but it's a rather tedious job. Let it be for now:

restart;
expr1:=sqrt(x^2*y - 4)*sqrt(x^2*y);
expr2:=sqrt((x^2*y - 4)*(x^2*y));
SolveTools:-SemiAlgebraic({op([1,1],expr1)>=0,op([2,1],expr1)>=0, op([1,1],expr2)>=0 , expr1^2=expr2^2}, {x,y});

 

restart;

plot3d(y^2, x=0..1, y=-1..1, style=surface, color=grey, filled=true, axes=normal, view=[-0.5..1.5,-1.5..1.5,0..1.5]);

Volume=int(y^2, [y=-1..1,x=0..1]);

 

 

plots:-implicitplot(x=y^2, x=0..9, y=-3..3);

 

The programm uses the first  2*K terms of your list only (you have  K=1 ). So all works properly:

restart;
interface(version);

genfunc:-rgf_findrecur(1, [1, 2], t, n);
t:=unapply(rsolve({%, t(1)=1},t(n)), n);
seq(t(n), n=1..4);

                     

The best quality will be if all surfaces are parameterized:

restart;
x:=r*cos(phi); y:=r*sin(phi); z:=3-x; H:=eval(z,r=2);
S1:=plot3d([x,y,0], r=0..2, phi=0..2*Pi, style=surface, color=blue): # Bottom
S2:=plot3d([eval([x,y],r=2)[],h], phi=0..2*Pi, h=0..H, style=surface, color=green): # Side surface
S3:=plot3d([x,y,z], r=0..2, phi=0..2*Pi, style=surface, color=red): # Top surface
plots:-display(S1,S2,S3, axes=normal, view=[-3..3,-3..3,0..5], scaling=constrained, lightmodel=light4, labels=["x","y","z"], labelfont=[times,bold,14]);

                        

We can also show the cutting plane using the  transparency  option:

restart;
x:=r*cos(phi); y:=r*sin(phi); z:=3-x; H:=eval(z,r=2);
S1:=plot3d([x,y,0], r=0..2, phi=0..2*Pi, style=surface, color=blue):
S2:=plot3d([eval([x,y],r=2)[],h], phi=0..2*Pi, h=0..H, style=surface, color=green):
S3:=plot3d([x,y,z], r=0..2, phi=0..2*Pi,  style=surface, color=red):
S4:=plot3d(3-u, u=-3..3, v=-3..3, style=surface, color=yellow, transparency=0.5):
plots:-display(S1,S2,S3,S4, axes=normal, view=[-3..3,-3..3,0..5], scaling=constrained, lightmodel=light4, labels=["x","y","z"], labelfont=[times,bold,14]);

                          

Edit.

 

f:=1/(z^2+I)^2;
convert(f, parfrac, sqrt(2));

    


We obtain this number  sqrt(2)  (a field expansion) by solving the equation

solve(z^2+I, z);

 

Some expressions are written ambiguously. It is not clear whether the expressions  2*x+x^2  and  sqrt(4*x^3+x^4)  must be in the numerator or in the denominator. I assumed that in the numerator.

restart;
P1:=plots:-shadebetween(0, 1/2*(2*x+x^2)+1/2*sqrt(4*x^3+x^4), x=0..1/13*(5-2*sqrt(3)), color="LightBlue"):
P2:=plots:-shadebetween(1/2*(2*x+x^2)+1/2*sqrt(4*x^3+x^4), 2*x,x=0..1/13*(5-2*sqrt(3)), color="Pink"):
T:=plots:-textplot([[0.1,0.05,c1],[0.1,0.17,c2]], font=[times,bold,16]):
plots:-display(P1,P2,T, view=[0..0.15,0..0.25], labels=[x,z]);

                           


Edit.

restart;
ode:=x*diff(y(x),x)*y(x) = (y(x)^2-9)^(1/2):
ic:=y(exp(4)) = 5:
sol:=dsolve([ode,ic],y(x));
res:=odetest(sol,ode);
solve(res) assuming x>0;

                   


Unfortunately, assuming real  often does not work and a more specific assumption is needed.

Edit.  Below is another solution, in which we first automatically find the domain of the expression  res , and then use this in  assuming :

restart;
ode:=x*diff(y(x),x)*y(x) = (y(x)^2-9)^(1/2):
ic:=y(exp(4)) = 5:
sol:=dsolve([ode,ic],y(x));
res:=odetest(sol,ode);
F:=indets(res, function);
R:=[solve(`and`(seq(`or`(F[i]>0, F[i]<0, F[i]=0), i=1..nops(F))))]; # The domain of res
solve(res) assuming `or`(seq(x in R[i],i=1..nops(R)));

 

First 42 43 44 45 46 47 48 Last Page 44 of 289