Kitonum

21835 Reputation

26 Badges

17 years, 221 days

MaplePrimes Activity


These are answers submitted by Kitonum

First, you can solve the equation for each value  T  in the range  300..800  with step 1, and then plot a graph using the data obtained (you will get a nice plot of even better quality than lower):

restart;
Data:=[seq([t,fsolve(eval(x*(3-2*x)^2/4/(1-x)^3=18325.73901+exp(36.58420421-10902.09286/T), T=t))], t=300..800)];
plot(Data);

 

Before the plotting both parts of the equation are multiplied by (1-x)^3 :

restart;
plots:-implicitplot(x*(3-2*x)^2/4=18325.73901*(1-x)^3+exp(36.58420421-10902.09286/T)*(1-x)^3, T=300..800, x=0..1, gridrefine=5);

          

 

 

In fact, this line intersects the circle at two points. Here are 2 ways to isolate the coordinates of these points (the second way is similar tomleslie's one only for two solutions):

eq1:= x^2+y^2=0.314:
eq2:= y=0.05180967688*x:
Sol:=solve({eq1,eq2}, [x,y]);
P1:=[seq(eval([x,y], s), s=Sol)];   
# The first way
P2:=map(rhs~, Sol);   # The second way

In Help see  DocumentTools:-Tabulate  command.

The most general way to specify a transformation in  R^2  or  R^3  is  plottools:-transform  command. In the following example, the unit circle is rotating by 90 degrees and simultaneously is reducing by 2 times:

restart;
f:=t->plottools:-transform((x,y)->convert(<cos(t),-sin(t); sin(t),cos(t)>.(<2,0>+(1-t/Pi)*(<x,y>-<2,0>)), list)):
A:=plots:-implicitplot((x-2)^2+y^2-1, x=-1..3, y=-1..3, color=red, thickness=2):
plots:-animate(plots:-display, ['f(t)'(A)], t=0..Pi/2, frames=100, scaling=constrained);

                 

                                     

Edit.

 

cycfunc:=proc(Expr, vars)
local n, P;
n:=nops(vars);
P:=[seq([seq(vars[j], j=i..n), seq(vars[j], j=1..i-1)], i=1..n)];
if `and`(seq(Expr=subs(`=`~(vars, p), Expr), p=P)) then return true else false fi;
end proc:

 

Example of use:

cycfunc(a^2*b + b^2*c + c^2*a, [a,b,c]);

                                                                          true


 

Here is the procedure for finding the minimum and the value of the variable  x  in which it is achieved (the nearest to a) according to your plan:

P:=proc(Expr, a, b, n)
local X, Y, m, i;
X:=[seq(a+k*(b-a)/n, k=0..n)];
Y:=[seq(eval(Expr,x=t), t=X)];
m:=min(Y);
for i from 1 to n+1 do
if Y[i]=m then return [X[i], m]  fi;
od;
end proc:

 

Example of use:

P(x^2-3*x+5, 0, 10, 100);
                                                               [3/2, 11/4]


 


 

 

f := x->0.012981+0.080285*cos(0.9519256799*x)+0.041370*cos(1.903851360*x)+
0.035690*cos(2.855777040*x)+0.000147*cos(3.807702720*x):
RootFinding:-Analytic(diff(f(x), x) = 0, x, re = -6 .. 6, im = -0.1 .. 0.1);
sort(simplify([%], zero));  
# Sorted list of all the extreme points

[-5.080827670, -4.391753823, -3.300249925, -2.208746026, -1.519672179, 0., 1.519672179, 2.208746026, 3.300249925, 4.391753823, 5.080827670]
 

Addition. If you need the coordinates of the points in a plane with an indication of the type of extremum it can be done as follows:

f := x->0.012981+0.080285*cos(0.9519256799*x)+0.041370*cos(1.903851360*x)+
0.035690*cos(2.855777040*x)+0.000147*cos(3.807702720*x):
RootFinding:-Analytic(diff(f(x), x) = 0, x, re = -6 .. 6, im = -0.1 .. 0.1):
sort(simplify([%], zero)):  
# Sorted list of all the extreme points
map(t->[`if`((D@@2)(f)(t)>0, Min, Max), [t, f(t)] ], %);  # These points in the plane

[[Min, [-5.080827670, -0.03003674673]], [Max, [-4.391753823, -0.01222338857]], [Min, [-3.300249925, -0.061477]], [Max, [-2.208746026, -0.01222338856]], [Min, [-1.519672179, -0.03003674679]], [Max, [0., 0.170473]], [Min, [1.519672179, -0.03003674679]], [Max, [2.208746026, -0.01222338856]], [Min, [3.300249925, -0.061477]], [Max, [4.391753823, -0.01222338857]], [Min, [5.080827670, -0.03003674673]]]

 

Max_Min_from_Graph1.mw

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]);

                       

 

 

 

First 167 168 169 170 171 172 173 Last Page 169 of 292