Kitonum

21550 Reputation

26 Badges

17 years, 125 days

MaplePrimes Activity


These are answers submitted by Kitonum

M := plottools:-arc([0, 0], 1, (1/6)*Pi .. 3*Pi*(1/4), color = blue, thickness = 4):
A:=plots:-display(plot(op(M)[1], color = "DeepPink", filled, scaling = constrained), M);
f:=plottools:-transform((x,y)->[x,y,0]):
plots:-display(f(A), scaling=constrained, axes=normal, view=[-1..1,0..1,0..0.5]);

 

Addition. Here is another way for 3d:

Arc:=plots:-spacecurve([x,sqrt(1-x^2),0], x=-1/sqrt(2)..sqrt(3)/2, color=blue, thickness=3):
B:=plot3d([x,y,0], x=-1/sqrt(2)..sqrt(3)/2,y=0..sqrt(1-x^2), style=surface, color = "DeepPink", scaling = constrained, axes=normal, view=[-1..1,0..1,0..0.5]):
plots:-display(Arc,B);

 

To investigate the dependence of the tangent field of a differential equation of a parameter, you can use  Explore  command:

restart;
Explore(DEtools:-DEplot(diff(y(x),x) = sqrt(1+(a*x)+(2*y(x))),y(x), x=-2..2, y=0..1), a=-2...2.);

 

Your function can not be expanded in powers  q  and  m  (ie, in the neighborhood of [0,0]) because q->sqrt(q)  is not differentiable at the point q=0 (the derivative equals infinity) but can be expanded for example in the neighborhood of [1,0] :

restart;
mtaylor(tanh(B*J*sqrt(q)*z+B*Jo*m), [q=1, m=0], 9);

Obviously this is the series for the function  y->a*cos(sqrt(beta)*y)  (a  and  beta  are parameters) in the neighborhood  y=0

A check:

series(a*cos(sqrt(beta)*y), y = 0, 25);

         

 

 

 

 

Probably you mean a hexagonal prism?

f:=piecewise(x>-1 and x<-1/2, sqrt(3)*(x+1), x>=-1/2 and x<=1/2, sqrt(3)/2, x>1/2, -sqrt(3)*(x-1)):
plot3d(2, x=-1..1, y=-f..f, style=surface, color=khaki, filled);

                              

 

 

X:=[0, 1, 2, 3, 4]:
Y:=[1, 2, 2.5, 4, 3]:
plot(X, Y);

If you would like to curve was smoother, use  CurveFitting:-Spline  command (see help for details)

 

Addition. Here is a smooth curve through the same 5 points:

evalf[3](CurveFitting:-Spline(X,Y, x));
plot(%, x=0..4);

 

If I understand your problem properly then use  view  option (below is the changed the last line of your code):

display(f1, g1, view = [0.8 .. 1.2, 0 .. 0.4]);

                       

 

 

 

The problem is easy to solve, if we note that  abs(x1-x2)  is the distance between the points with the coordinates  x1  and  x2  on the real axis.

restart;
a:=0: b:=1.6: c:=4: d:=4.4:
f:=convert(abs(x-b)+abs(a-x)+abs(x-a)+abs(d-x)+abs(b-d), fraction):
minimize(f, x=0..convert(d, fraction));
plot(f, x=0..d, 0..15);  
# Visual check

                        

We see that the problem has no unique solution. The variable  x  can vary in the range  0 .. 1.6

 

Edit.

acer here gave a partial solution of the problem. Below the full solution is given

restart;
assume(n, posint):
r:=cos(t/n)^n:
x:=r*cos(t):  y:=r*sin(t):
r1:=eval(r,n=2):  r2:=eval(r,n=4):
plots:-display(<plots:-display(plot(r1, t=0..2*Pi, coords=polar, color=red), plot(r2, t=0..4*Pi, coords=polar, color=blue), title="Red curve for n=2, blue curve for n=4")| plots:-display(plot(r1, t=0..2*Pi, coords=polar, color=red), plot(r2, t=0..4*Pi, coords=polar, color=blue), view=[-0.05..0.05,-0.05..0.05], title="Zoom 20:1 near the origin")>, scaling=constrained);  # The plots of the curves for n=2 and n=4
PP1:=seq(simplify(convert([r1*cos(t),r1*sin(t)],radical)),t=[Pi/4,3*Pi/4]);  # 2 points on the first curve 
PP2:=seq(simplify([r2*cos(t),r2*sin(t)]),t=[Pi/3,Pi/2]);  # 2 points on the second curve 
P:=eval({[r1*cos(t),r1*sin(t)],[r2*cos(t),r2*sin(t)]}, t=0)[]; # The common point
Int(eval([sqrt('diff(x(t),t)'^2+'diff(y(t),t)'^2),t=0..n*Pi],n=4)[])=int(eval([sqrt(diff(x,t)^2+diff(y,t)^2),t=0..n*Pi],n=4)[]);  # The length of the curve for n=4
combine(simplify(diff(y,t)/diff(x,t))):
A:=op(trigsubs(numer(%)))/op(trigsubs(denom(%))); # This is simplified dy/dx
B:=(normal@expand)~(%);  # This is the desired form for dy/dx
sol:=solve(denom(A)=0, t, allsolutions);  # The formula for all the solutions
indets(%)[1]: # The name of a parameter in the set of all the solutions
h:=subs(%=1, sol);  # The smallest positive solution
n*Pi/h;  # The number of solutions in the range 0<=t<n*Pi 

           

    

Because all solutions are equally spaced, then the number of solutions is equal to the quotient of devision the  length of the interval by the smallest positive solution

 

In fact, these expressions are identical. See

restart;
A:=(sin(t)*sin(t/n)-cos(t)*cos(t/n)) /(sin(t)*cos(t/n)+cos(t)*sin(t/n));
x:=cos(t/n)^n*cos(t):
y:=cos(t/n)^n*sin(t):
w:=diff(x,t);
z:=diff(y,t);
B:=simplify(z/w);
simplify(A-B);

Output of the last command is  .

Example:

ff := t->plots:-display(plottools:-point([cos(t), sin(t), t], colour = red, symbolsize = 50, symbol = solidsphere));
plots:-animate(ff,[t], t=0..4*Pi, frames=100);

 

unapply causes an error due to premature calculation.

 

This a type is called rather than a structure:

A:=(a-b)*(c-d) + (e-f)*(g-h) = i:
whattype(A);
whattype(op(1,A));
whattype(op(2,A));
whattype(op([1,1],A));
whattype(op([1,1,2],A));

 

I added  L  to the unknowns in order to the number of unknowns equals to the number of equations:

Sys:={a[0]=L+(2*beta*mu)/(3*alpha*omega^2),a[1]=sqrt((4*mu)/(3*alpha*omega^2)),a[2]=(2*beta*mu)/(9*alpha*omega^2),a[3]=sqrt(mu^3/(432*alpha*omega^2)),omega[s]=omega-(mu^2/16*omega)-((2*beta^2*mu)/(9*alpha*omega))};
solve(Sys, {L,alpha,beta,mu,omega});

In this system, each equation contains only one unknown. Therefore each unknown can be found by the same formula with two parameters  a=sum(a[i], i=1..n)  and  b :

solve(a*x+x^3=b, x);

        

 

See  Wiki   for details.

Below we find the general and a particular solution of the equation for specific parameters:

restart;
Eq:=P=i(t)^2*r+diff(1/2*l(c)*i(t)^2, t)+1/2*i(t)^2*diff(l(c), c)*w:
dsolve(Eq, i(t));
Eq1:=eval(Eq, {P=2, r=3, l(c)=sin(c), w=1});
dsolve({eval(Eq1, c=Pi/3), i(0)=5}, i(t));

       

 

 

First 166 167 168 169 170 171 172 Last Page 168 of 290