Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Application of the properties of real numbers such as divisible factors, quantity and sum of prime divisors, DCM and MCM among others. All the technology embedded components of Maple.

 

Propiedad_de_los_Numeros.mw

 

Atte.

L.AraujoC.

 

 

 

I have a problem when using units in a solve

restart;
Following is from the assignment
Q := 20*Unit('m')^3/Unit('s');

I__e := 0.2e-1;

B := 2*Unit('m');

k := 0.3e-2*Unit('m');

g := 9.82*Unit('m')/Unit('s')^2;

Mannings number
M := 8.1*g^(1/2)/k^(1/6);
A := y*B;


R := y*B/(B+2*y);


V := M*R^(2/3)*sqrt(I__e);
y__0 := solve(Q = V*A, y);
=
/ (5/3)\// /
\0.002644870772 Units:-Unit('m') / \RootOf\
(8/3) 3 (5/3)
-625 Units:-Unit('m') + 5000000 _Z Units:-Unit('m')

5 \ \
+ 1890451531 _Z Units:-Unit('m')/^2/

 

Hope you can use this.. It's the first time I ask a question on this site...

Could anyone please hepl me? I have the following system

e1 := exp(F(r)/phi_0)*L*A(r) = (1/2)*(2*(diff(A(r), r, r))*B(r)*A(r)*r*C(r)+2*B(r)*A(r)*(diff(A(r), r))*(diff(C(r), r))*r-(diff(A(r), r))^2*B(r)*r*C(r)-(diff(A(r), r))*(diff(B(r), r))*A(r)*r*C(r)+4*B(r)*A(r)*(diff(A(r), r))*C(r))/(B(r)^2*A(r)*r*C(r));
e2 := alpha*(diff(F(r), r, r))+(alpha^2+omega)*(diff(F(r), r))^2+(1/4)*(4*(diff(C(r), r, r))*B(r)*A(r)^2*C(r)*r+2*(diff(A(r), r, r))*A(r)*B(r)*r*C(r)^2-2*B(r)*A(r)^2*(diff(C(r), r))^2*r-(diff(A(r), r))^2*B(r)*r*C(r)^2-2*A(r)^2*C(r)*(diff(C(r), r))*(diff(B(r), r))*r-(diff(A(r), r))*(diff(B(r), r))*A(r)*r*C(r)^2+8*B(r)*A(r)^2*C(r)*(diff(C(r), r))-4*A(r)^2*C(r)^2*(diff(B(r), r)))/(r*A(r)^2*B(r)*C(r)^2)-(1/4)*(2*(diff(A(r), r, r))*B(r)*A(r)*r*C(r)+2*B(r)*A(r)*(diff(A(r), r))*(diff(C(r), r))*r-(diff(A(r), r))^2*B(r)*r*C(r)-(diff(A(r), r))*(diff(B(r), r))*A(r)*r*C(r)+4*B(r)*A(r)*(diff(A(r), r))*C(r))/(B(r)*A(r)^2*r*C(r)) = 0;
e3 := (1/4)*(-2*(diff(C(r), r, r))*B(r)*A(r)*r^2-B(r)*(diff(A(r), r))*(diff(C(r), r))*r^2+A(r)*(diff(C(r), r))*(diff(B(r), r))*r^2-8*B(r)*A(r)*(diff(C(r), r))*r-2*B(r)*(diff(A(r), r))*C(r)*r+2*A(r)*C(r)*(diff(B(r), r))*r+4*B(r)^2*A(r)-4*B(r)*A(r)*C(r))/(B(r)^2*A(r)) = -(1/4)*(2*(diff(A(r), r, r))*B(r)*A(r)*r*C(r)+2*B(r)*A(r)*(diff(A(r), r))*(diff(C(r), r))*r-(diff(A(r), r))^2*B(r)*r*C(r)-(diff(A(r), r))*(diff(B(r), r))*A(r)*r*C(r)+4*B(r)*A(r)*(diff(A(r), r))*C(r))*r/(B(r)^2*A(r)^2);
e4 := -(alpha^2+2*omega)*(diff(F(r), r))*(-(1/2)*(-(diff(A(r), r))*B(r)*r^4*C(r)^2-A(r)*(diff(B(r), r))*r^4*C(r)^2-4*A(r)*B(r)*r^3*C(r)^2-2*A(r)*B(r)*r^4*C(r)*(diff(C(r), r)))/(A(r)*B(r)*r^4*C(r)^2)-(diff(B(r), r))/B(r)+(diff(F(r), r, r))/(diff(F(r), r))+alpha*(diff(F(r), r)))/B(r) = -exp(F(r)/phi_0)*V_0*(alpha-1/phi_0);

phi_0 := -alpha/(2*alpha^2+2*omega); L := V_0*(1-(alpha-1/phi_0)*alpha/(3*alpha^2+2*omega)); V_0 := -lambda*exp(-fc/phi_0); fc := ln((4*alpha^2+2*omega)/(G_0*(3*alpha^2+2*omega)))/alpha; m := (2/(1+g))^(1/2); n := g*(2/(1+g))^(1/2); P := (G_0*(3*alpha^2+2*omega)/(4*alpha^2+2*omega))^(-2*alpha/(n-m)); eta := 1.4*G_0*Ms*(2/(1+g))^(-1/2)/c^2; g := 1-alpha^2/(2*alpha^2+omega);

omega := -10^5; alpha := 1; G_0 := 6.67*10^(-11); lambda := 10^(-52); c := 2.9*10^8; Ms := 1.9*10^30;
ri := evalf(1000*eta);

ics := A(2.109660445*10^6) = 1, (D(A))(2.109660445*10^6) = 2.370091128*10^(-15)*sqrt(2)*sqrt(99998)*sqrt(199997), B(2.109660445*10^6) = 1, C(2.109660445*10^6) = 1, (D(C))(2.109660445*10^6) = 4.740182256*10^(-15)*(1-(99999/19999300006)*sqrt(2)*sqrt(99998)*sqrt(199997))*(1-1.000017501*10^(-8)*sqrt(2)*sqrt(99998)*sqrt(199997))^(-(99999/19999300006)*sqrt(2)*sqrt(99998)*sqrt(199997))*sqrt(2)*sqrt(99998)*sqrt(199997), f(2.109660445*10^6) = 23.43081116, (D(f))(2.109660445*10^6) = 4.749681180*10^(-15):

eta:=2109.660445: sys:=e1,e2,e3,e4; vars:=[A(r),B(r),C(r),F(r)];

dsn3 := dsolve([sys, ics], numeric, vars, range = 3*eta .. 50*eta);

Results in

Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

Setting f(r)=Const,V_0=0 which is a physically relevant case, results in

Error, (in simplify/normal) numeric exception: division by zero

I suugest the problem is that the equation contain sqared derivatives, hence there are several solution branches corresponding to different signs of square root. Maple chooses the singular branch. How can I force it to choose another branch or calculete all of them?

Thanks in advance..





Attached is a photo with the code I am working for.  

On the top is practice code with a simpler ODE to help with trouble shooting, on the bottom is the ODE I am working with.

I was hoping to gain insight about the _z1 symbol in the solution, I haven't been able to find much help on other threads.  I would like to know how I can go about working with it - if it is something on my end or if it is the nature of the equation I am working with.

 

Thank you for any help,

Josh

I have a nice procedure that is as follows, that explores the behaviour of a mapping in R^2.

InversePoincare := proc (v) options operator, arrow; v*Norm(v, 2)/(1-Norm(v, 2)^2) end proc

SphereVectorPlot := proc (T, radius, radiusIncrements, angleIncrements, lengthParam)
local listOfPairs;
listOfPairs := {seq(seq([[radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements], T(InversePoincare(`<,>`(radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements)))-InversePoincare(`<,>`(radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements))], r = 0 .. radiusIncrements), angle = 0 .. angleIncrements)};
if lengthParam = false then
 return arrow(listOfPairs, scaling = constrained, shape = arrow)
else
 return arrow(listOfPairs, length = lengthParam, scaling = constrained, shape = arrow)
end if
end proc

Essentially, we plot vectors v at location u. Since the vectors v in general vary wildly in magnitude, I would like to visualize the magnitude change by using color and/or transparency, preferably the latter. Is it possible to do so, and if so, how?

When I create any plot or drawing in Maple and print to pdf, the program adds a blank space underneath the plots. How can I stop this from happening?

Example: Some code I wrote, before hitting enter

The code I wrote, before plotting the figure

After hitting enter
BTW if somebody knows how to avoid getting the extra [> I'm much obliged

 

And now a screenshot from the print to pdf

See the blank space which is suddenly added?! It really destroys my lay-out for my report. I think the solution must be an easy change in the settings, but I can't figure it out.

 

Thanks in advance

Can someone help me figure out what's going on? Here's the PDE I'm trying to solve, and I'm clearly getting the wrong answer.

 

Hello Everyone,

 

I would like  to write a code to calculate the riemann sum approximation of the curve sin(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 my code give me  an error..please someone can advise me which part of my code is not correct..

Thanks very much in advance!

> g := proc (x, y) options operator, arrow; sin(sqrt(x^2+y^2))+1 end proc;

 Z := g(x, y);

 

 X := Array(0 .. n); Y := Array(0 .. n); Z := Array(0 .. n);

 

c := -2*Pi; d := 2*Pi;

a := -2*Pi; b := 2*Pi;

n := 15;

s := 0;

X[0] := a; Y[0] := c; Z := g[X[0], Y[0]]; s := 0;

dX := (b-a)/N;dY := (d-c)/N;

    for i from 0 to N do      for j from o to N do     s:=s+Z[i]*dX*dY     X[i]:=X[i-1]+dX: Y[i]:=Y[i-1]+dY: Z[i]:=g([Xi],[Yi])  end do;

This the error message i am getting (Error, unterminated loop)

 

 

 

 

 

 

 

 

Hi,

Recently a a simple problem which i can not handle by myself, made me confused.

I have simple code of maple which is not stable at all. Everytime I run the code, the final result which is the determinant of a matrix, changes and I can not see the problem with the code. In fact i noticed that problem occures when the matrix is being build by culculating the coefficients of some constant values.  I have attached the code. Could you see what is wrong here?

Thanks by the way.

Download Code.mw

 

Hello,

 I need help writing a maple code to calculate the normal to the curve X^2-2X at x=1.5

and also display the curve, the tangent, and the normal on the same plot in the range x=[-10,10].

I manage to answer the question, but i am not quite certain if i have written a proper code..please if someone can review my solution and advise me i would really appreciate it....

I also would like to also make visisble the point of tangency at x=1.5 and give description of the figure but i am not sure how to do so...

 

how can i cut and paste the exact code with the images....it seesm that it doesnt allow me to do direct cut and paste so i changed it to 1-D and paste it into this page..

Thank you for your help.. 

 

 

 

 

 

restart;

 

 

    f := proc (x) options operator, arrow; x^2-2*x end proc;

   (D(f))(x);

 

 #Then, the slope of the line tangent to the graph of f(x) at the point with x-coordinate, x=1.5 is,

 

    D(f)*at*x = 1.5; 

   evalf((D(f))(1.5));

 

#The y-coordinate of the point is 

 

  f(x)*at*x = 1.5;

 

   evalf(f(1.5));

 

   showtangent(f(x), x = 1.5, color = [black, purple]);

   plot([f(x), (D(f))(1.5)*(x-1.5)+f(1.5)], x = -10 .. 10, y = -10 .. 10, color = [black, purple]);

 

 

  plot([x^2-2*x, x-1.5-.75, -x+.75], x = -10 .. 10, y = -10 .. 10, color = [black, purple, pink]);

 

 

 

 

 

 

hi, is there a way to change color of the page in Maple 18? in fact I am preparing my lectures using slideshow option and want to change the color instead of the default white.

Hi,

I'm, trying to write a nested loop in maple, but I keep getting the Unterminated Loop error. I'm sure the solution is quite simple, but I haven't been able to find it. Any suggestions would be much appreciated. The loop looks like this:

 

i:=0:
di:=25:
n:=1:  

while (n<=nLimit) do
sol1:=fsolve(eq1, y=i..i+di)
     if type(sol1, numeric) = true then
     lambda(n) :=sol1
     i:=i+di
     n:=n+1
     else  i:=i+di
     end if:
end do:

hello everyone..

please...

I need help to write a code to calculate the riemann sum approximation of the curve cos(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 

Thank you for your help!

hi everyone,

i need help to write a maple code to generate an animation sequence showing the taylor series approximation of tan(x) from 

N=1..5.

plot the animation from x=-2pi to 2pi and y=-5 to 5.

 

thank you for your help..

hi everyone,

I need help writing a maple code to calculate the normal to the curve X^2-2X at x=1

and also display the curve, the tangent, and the normal on the same plot in the range x=[-2,2].

 

thank you for your help!

First 62 63 64 65 66 67 68 Last Page 64 of 86