MaplePrimes Questions

Hi there,

I was given the following tasks (Only the last part of Ex 3,but Ex 2 is relevant,further explanation in my maple code:)

questionLAB.mw

Thanks!

EDIT:Just in case if anyone is completely baffled by the lack of context,here is the original version of Lab 1.

Context.mw

Hello,

How can i solve this integro-PDE(partial diffrential equation)??

regards...

eq := (1+6*(l/h)^2/(1+nu))*(diff(u(xi, tau), xi, xi, xi, xi)+int(-B*lambda*exp(-lambda(tau-s))*(diff(u(xi, s), xi, xi, xi, xi)), s = 0 .. tau))+diff(u(xi, tau), tau, tau) = alpha*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)+int(-B*lambda*exp(-lambda(tau-s))*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)), s = 0 .. tau))*(diff(u(xi, tau), xi, xi))+V^2*(sum(j*u(xi, tau)^(j-1), j = 1 .. 8))

jing-Fu.mw

hai,

 i want to plot a graph here is my codes and i want the graph like this, can any body help me

 

restart:
with(DEtools):
with(plots):

h(z):=1-(delta2/2)*(1 + Cos(2*(Pi/L1)*(z - d1 - L1))):
K1:=((4/h^4)-(sin(alpha)/F)-h^2+Nb*h^4):
lambda:=int(K1,z=0..1):
F:=0.3:
L1:=0.2:
d1:=0.2:
alpha:=Pi/6:
evalf(lambda);

The program below is a high school problem, related to the area a horse can graze, given it is tethered to a rectangular barn.  The level of difficulty is related to the length of rope.  

   I wanted to display some graphics of the field, barn and tethered horse - this latter being the most difficult.  I experimented with a .png picture of a plain silouhette of a horse, imported this into Photoshop, then saved it as a .pdf file, importing this into Maple,  I managed to import this into the worksheet, but I wanted a scaled down version of the horse in the program plots[display] section.  I was unsuccessful in this.  Undeterred, I decided to try and draw a version of a horse using the plots/plottools packages.  The resulting "horse" looks more like a cat, warthog,  mouse or chameleon! 

   I understand later versions of Maple are able to import graphic images.   I'd appreciate some feedback as to how easy this is, and the quality of the resulting images in Maple output.

Thanks,

    David  .  .    

 

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Horse tethered to barn - what area of grass?

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

macro(palegreen=COLOR(RGB, .5607, .9372, .5607)):

col1:=`black`:

print(`A horse is tethered to the corner of a barn, 10 m wide and 20 m long.  Find the area`);

print(`the horse can graze, if the length of rope is:`);

print(` i.)   5 m   ii.)  25 m  amd iii.)  50 m`);

#Length of rope

L:=10:

#Dims of barn

len:=20:wid:=10:

#Position of bottom left corner of barn

x_barn:=50:y_barn:=50:

len:=20:wid:=10:

 

#dimensions of field

flen:=120:fwid:=110:

 

rect_barn:=rectangle([x_barn,wid+y_barn], [len+x_barn,y_barn], color=brown):

rect_field:=rectangle([0,fwid], [flen,0], color=palegreen):

 

#Position of horse

x0:=37:y0:=32:

a := 4: b := 2.5:

belli := ellipse([x0,y0], a, b, filled=true, color=col1):

legf:=line([x0-1,y0-2], [x0-2,y0-6], color=col1, linestyle=1, thickness=1):

legf2:=line([x0-2,y0-2], [x0-3,y0-6], color=col1, linestyle=1, thickness=2):

rleg:=line([x0+1,y0-2], [x0+2,y0-6], color=col1, linestyle=1, thickness=2):

 

rleg2:=line([x0+2,y0-2], [x0+3,y0-6], color=col1, linestyle=1, thickness=2):

head := polygon([[x0-6,y0+3],[x0-5,y0+4], [x0-2,y0+5], [x0-3,y0+2]], color=brown, linestyle=3, thickness=2):

tail:=line([x0+6,y0-4], [x0+4,y0+1], color=col1, linestyle=1,thickness=2):

 

a := arc([x0+13,y0+3], 15, Pi/2..Pi+.1, color=blue):

plots[display](a,tail,head,belli,legf,legf2,rleg,rleg2,rect_barn,rect_field, scaling=constrained, axes=none);

for example, we need define  inverse function of g(x) where 

g(x)=int(exp(z^2), z = 0 .. x).

 

 

In the link below I attempt to solve 2 trig series which are essentially equivalent as indicated by the numerical output of eq (5).  The series  represented by S13 & S14 has arguments of the trig functions that realizes that only the odd terms for k yield non-zero results.  The case represented S11 & S12 by makes no such presumption; nonetheless, all cases agree within reason numerically.  Now to find min/max values taking the derivative is needed which is simply done by removing the integral as indicated by Q1 through Q6.

Now resolving the roots works OK for Q6 because beta = 2*pi *t/T conveniently collapsed the numerator into factorable expressions.  Resolving the roots for Q3 did not work so well because what I think is that the expression in red has multiple roots so it only spits out t as the solution?  I expressed the angle alpha in terms of beta & probably need to resolve kappa to somehow get the expression in red to collapse into a factored expression, but I am not sure how to execute this.  When I solve for kappa I get ZERO.

Does anyone have suggestions?  Remember I demonstrated that both series are practically idendical numerically; hence, there derivatives should be as well as long as both series are well behaved functions.  So the solutions must be the same as well.

trig_series_solns.mw

can result ?

Please help me?

 

Hi Dears,

Let us consider the following polyhedral cone which is defined by 8 inequalities (also, x,y,z ≥0): 

1. y-z ≥0

2. 3y-2z ≥0

3. 2y-2z ≥0

4. x-2y+z ≥0

5. x-y ≥0

6. 2x-y ≥0

7. x-z ≥0

8. x+y-z ≥0. 

How can we deduce that the inequalities 3 and 4 may be define this polyhedral cone and the others are redundant?

How can remove the redundant inequalities for defining this polyhedral cone?

Is there any Maple command or function that recive these 8 inequalities and return inequalities 3 and 4? In fact, inequalities 3 and 4 are facets of this polyhedral cone. 

 

Thank you in advanced. 

Sincerely yours

Hi,

I am a little bit surprised by the result of the operation evalf[8](f(y)) in the piece of code that follows.
I was expected the answer to be 2.4494897, not 2.4494898.

Happily the sequence
res := f(y) ; evalf[8](res)
returns the expected result 2.4494897

I suspect the difference comes from some precedence of the operators (f and evalf) but I can't figure out what really happens

Could you enlight me please ?

Thanks in advance

 

restart:

interface(version);

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

Digits;

10

(2)

f := x -> sqrt(2.0)*x;

proc (x) options operator, arrow; sqrt(2.0)*x end proc

(3)

y := sqrt(3.0):

f(y);

2.449489743

(4)

evalf[9](f(y));  # right

2.44948974

(5)

evalf[8](f(y));  # ????

2.4494898

(6)

res := f(y);
evalf[8](res);  # right

2.449489743

 

2.4494897

(7)

 

 

 

with maple

How can in maple 2015? Help me?

hi every one

I need to rearrange the matrix variables after using collect command

R[3, 3] := collect(R[3, 3], z^2);
                                  2             
               (-cos(theta) + 1) z  + cos(theta)
sort(R[3, 3]);
                                  2             
               (-cos(theta) + 1) z  + cos(theta)

i want it to appear as z(1-cos(theta))+cos(theta) ,  can i use sort or sequence or there is another command to do this   ???

hi everyone,

i have attached a maple worksheet which you can see the issue...azido_displacement.mw
i think tittle says by itself... thanks in advance for taking the time to review and aswer me.

 

theta__o := (1/4)*Pi

(1/4)*Pi

(1)

omega__o := 0

0

(2)

tau := 1

1

(3)

m := 2.28335

2.28335

(4)

g := 9.80665

9.80665

(5)

L := .35

.35

(6)

Iota := 0.9996799726e-1

0.9996799726e-1

(7)

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(8)

SolveEquations([omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau+(1/3)*alpha__3*tau = 0, theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau)*tau-(1/2)*alpha__2*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau)*tau+(1/2)*alpha__3*((1/3)*tau)^2 = (1/2)*Pi, int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. (1/3)*tau)+int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)-alpha__2*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)), t = 0 .. (1/3)*tau)+int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau)*tau-(1/2)*alpha__2*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau)*t+(1/2)*alpha__3*t^2)+alpha__3*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau)*tau-(1/2)*alpha__2*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau)*t+(1/2)*alpha__3*t^2)), t = 0 .. (1/3)*tau) = 0], initialpoint = [alpha__1 = 12.7751705882228, alpha__2 = 18.4817577058678, alpha__3 = 5.70658711764534])

[6.74607137501932*10^(-24), Vector(3, {(1) = HFloat(1.936228954946273e-13), (2) = HFloat(2.027322754116767e-12), (3) = 0.1612e-11}), [`#msub(mi("α",fontstyle = "normal"),mi("1"))` = 14.7208062595154, `#msub(mi("α",fontstyle = "normal"),mi("2"))` = 22.3730290484357, `#msub(mi("α",fontstyle = "normal"),mi("3"))` = 7.65222278892092], 139]

(9)

alpha__1 := 14.7208062595154

14.7208062595154

(10)

alpha__2 := 22.3730290484357

22.3730290484357

(11)

alpha__3 := 7.65222278892092

7.65222278892092

(12)

x__1 := int(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. t), t = 0 .. t2)

int(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. t), t = 0 .. t2)

(13)

x__2 := int(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. t), t = 0 .. (1/3)*tau)+t2*(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. (1/3)*tau))+int(int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)-alpha__2*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)), t = 0 .. t), t = 0 .. t2)

int(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. t), t = 0 .. 1/3)+t2*(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. 1/3))+int(int(-.4379530076*(22.39201428*cos(-1.603220734-4.906935420*t+11.18651452*t^2)-20.11649647)/sin(-1.603220734-4.906935420*t+11.18651452*t^2), t = 0 .. t), t = 0 .. t2)

(14)

x__3 := int(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. t), t = 0 .. (1/3)*tau)+(1/3)*tau*(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. (1/3)*tau))+int(int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)-alpha__2*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)), t = 0 .. t), t = 0 .. (1/3)*tau)+t2*(int((m*g*cos(omega__o*t+theta__o+(1/2)*alpha__1*t^2)+alpha__1*(L*m+Iota))/(m*sin(omega__o*t+theta__o+(1/2)*alpha__1*t^2)), t = 0 .. (1/3)*tau)+int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)-alpha__2*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau)*t-(1/2)*alpha__2*t^2)), t = 0 .. (1/3)*tau))+int(int((m*g*cos(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau)*tau-(1/2)*alpha__2*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau)*t+(1/2)*alpha__3*t^2)+alpha__3*(L*m+Iota))/(m*sin(theta__o+(1/3)*omega__o*tau+(1/2)*alpha__1*((1/3)*tau)^2+(1/3)*(omega__o+(1/3)*alpha__1*tau)*tau-(1/2)*alpha__2*((1/3)*tau)^2+(omega__o+(1/3)*alpha__1*tau-(1/3)*alpha__2*tau)*t+(1/2)*alpha__3*t^2)), t = 0 .. t), t = 0 .. t2)

int(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. t), t = 0 .. 1/3)+(1/3)*(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. 1/3))+int(int(-.4379530076*(22.39201428*cos(-1.603220734-4.906935420*t+11.18651452*t^2)-20.11649647)/sin(-1.603220734-4.906935420*t+11.18651452*t^2), t = 0 .. t), t = 0 .. 1/3)+t2*(int(.4379530076*(22.39201428*cos((1/4)*Pi+7.360403130*t^2)+13.23607306)/sin((1/4)*Pi+7.360403130*t^2), t = 0 .. 1/3)+int(-.4379530076*(22.39201428*cos(-1.603220734-4.906935420*t+11.18651452*t^2)-20.11649647)/sin(-1.603220734-4.906935420*t+11.18651452*t^2), t = 0 .. 1/3))+int(int(.4379530076*(22.39201428*cos(1.995919816-2.550740930*t+3.826111394*t^2)+6.880423404)/sin(1.995919816-2.550740930*t+3.826111394*t^2), t = 0 .. t), t = 0 .. t2)

(15)

plot([x__1, x__2, x__3], t2 = 0 .. (1/3)*tau)

 

``


 

Download azido_displacement.mw

 

FLRW_Metric.mw

I have been tasked with calculating all the non-vanishing Christoffel symbols (first kind) of a metric and have done these long-hand using the Lagrangian method and shown my working. However, for peace of mind I would like to run the metric through Maple and double-check that it returns the same answers (going back through my calculations if I have missed anything). I have attached the code I have written at the bottom.

I have no trouble defining the metric and the manifold but I receive an error message when I try to compute the Christoffel symbols 'improper op or subscript selector'. Could someone point out where I have made a mistake. The metric is the FLRW metric if that helps.

with(DifferentialGeometry):with(Tensor);

g1:=evalDG(-(dt)^2 +a(t)^2*((dx)^2+(dy)^2+(dz)^2)/(1+(k/4)*(x^(2)+y^(2)+z^2))^2 );

C1:=Christoffel(g1, "FirstKind");

 

 

Plot3d in this worksheet calls a procedure which conditionally returns the values for a parametrically defined ellipsoid, but the plot command fails. However the procedure passes the correct list of parametric values when it is called directly.

Is there a way to call a procedure within plot3d which successfully plots a parametrically defined surface?

Plot3d_proc_parametric.mw

Can we overide Maple default dot derivative with 'tau' instead of 't'?

First 835 836 837 838 839 840 841 Last Page 837 of 2386