Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi.

In some cases when dealing with vectofields an such the are integral has to be expressed in terms of r(t).

the general form for r is r^2=(r*cos(t)-a)^2+(r*sin(t)-b)^2, When I solve this in maple it seems like I get the inverse of the desired result.

If I knew that was always the case I could just inverse my result to get the right expression for r, but im not sure if it only applies for this particular cas or all cases.

I would be happy if anyone took a quick look and suggested a way to obtain the desired solution for any center (a,b) for the circle.

 


 

Expression for radius, circle centred at (a,b)

RA := r^2 = (r*cos(t)-a)^2+(r*sin(t)-b)^2

r^2 = (r*cos(t)-a)^2+(r*sin(t)-b)^2

(1)

isolate(r^2 = (r*cos(t)-a)^2+(r*sin(t)-b)^2, r)

r = (1/2)*(a^2+b^2)/(cos(t)*a+b*sin(t))

(2)

eval(%, [a = -1, b = 0])

r = -(1/2)/cos(t)

(3)

plot3d([-2*x, x^2+y^2], y = -sqrt(-x^2-2*x) .. sqrt(-x^2-2*x), x = -2 .. 0, color = [green, red], orientation = [0, 0, 0])

 

(1/2)*Pi <= t and t <= 3*Pi*(1/2)

(1/2)*Pi <= t and t <= (3/2)*Pi

(4)

0 <= r and r <= -2*cos(t)

0 <= r and r <= -2*cos(t)

(5)

Area_off_center = int(r, [r = 0 .. -2*cos(t), t = (1/2)*Pi .. 3*Pi*(1/2)]); 1; Area_at_center = int(r, [r = 0 .. 1, t = 0 .. 2*Pi])

Area_off_center = Pi

 

Area_at_center = Pi

(6)

``

``


 

Download parametrization_of_r_not_centred_at_orgin.mw
 

I would also happily like to know how I can solve for the range r can take, obviously in the example i´m working with here r starts at 0, but that is not always the case i guess.

 

Thank you, your help is much apperciated

Hello

I changed the color of the background of a worksheet in black (I introduced a Table for that reason) because the white color hurts my eyes. I still have a couple of things that I'd like to modify:

1. The blinking cursor is black and is now invisible. How can I change its color?

2. The default input color is red ; i'd like to change it in white. How can I do?

Thanks Nicola

How do I genereate random negative numbers?

 

when i put a minus sign in the rand-function i get an error.

 

I need to for example generate a random number between -r and r, where r is the input

 

 

Is there a difference between scoping rules for regular procedures and for arrow operators?

      Inspired by the theme
http://www.mapleprimes.com/questions/219995-Finding-A-Convinient-Parametrization-Of-Surfaces
Examples in the Mathematica did Alexander Bannikov.
It is equidistant radius 0.1 to the surface

   (x1 ^ 2 + x2 ^ 2-0.4) ^ 2 + (x3 + sin (x1 * x2 + x3)) ^ 4-0.1 = 0;

https://vk.com/doc7819263_439405418?hash=af46d61d8aad95f70b&dl=9f245f5b6b68b47075

and an example of parameterization the same surface

https://vk.com/doc7819263_439432143?hash=36cf31d52c97e2e373&dl=7e4fa17a771dffb331

As I have understood from the words of Alexander Bannikov, parameterization was performed using the functions: RegionFunction, ContourPlot3D, ClippingPlanes.

It turns out that Maple functions inferior?

Hi everybody, 

I am working with Maple 2015.2 ; system = OS X El Capitan
I would like to compare the outputs of two files by using  the Worksheet:-Comparator command

OriginalFile.mw file contains this single instruction
> a:=1;

ModifiedFile.mw contains this single instruction
> a := 2;

Both us are located on my desktop, which is also my current directory in the worksheet from which I am going to run the comparison.

MyDir := cat(currentdir(), "/Desktop/");
OriginalFile := cat(MyDir, "OriginalFile.mw"):
ModifiedFile := cat(MyDir, "ModifiedFile.mw"):

# to verify that all is going well I use these two commands 
# Worksheet:-DisplayFile(OriginalFile):
# Worksheet:-DisplayFile(ModifiedFile):

Running the  command  Worksheet:-Comparator(OriginalFile, ModifiedFile) returns me error messages :
The first one is  (after having selected  "compare" and next "run" in the Comparator Maplet) 

and the second one (after having cliked ont the "OK" button" on this alert window)

Note that the same thing happens if I use Worksheet:-Comparator() and select the two files with the browsers
Could you please help me to understand what happens ?

Thanks in advance

 

How do I solve the problem that attached? Please give me the correction. thank you

Let us look in RealDomain and then in the RealDomain:-solve command. One is addressed to the usual solve command. The commands of the RealDomain package are not still documented since Maple 7 when the package was introduced. There is a general description only 

  • By default, Maple performs computations under the assumption that the underlying number system is the complex field. The RealDomain package provides an environment in which computations are performed under the assumption that the basic underlying number system is the field of real numbers.
  • Results returned by procedures are postprocessed by discarding values containing any detectable non-real answers or replacing them with undefined where appropriate.

The above is not enough. Here is an example which confuses me: 

RealDomain:-solve(exp(I*x) = -1, AllSolutions);
NULL

though 

solve(exp(I*x) = -1, AllSolutions);
                         Pi (2 _Z1 + 1)

and 

RealDomain:-solve(exp(I*x) = -1);
                               Pi

I lie awake thinking about that. Maplesoft staff help me!

Hello! Hope everything fine with you. I am try to solve the three-point differential by numerical method in attached file but failed. Please see the attachement and solve my problem. I am very thankful your kind effort. Please take care.

three-point.mw

With my best regards and sincerely.

Muhammad Usman

School of Mathematical Sciences 
Peking University, Beijing, China


 

refresh

refresh

(1)

G := 6.6743*10^(-8); 1; c := 2.99792458*10^10; 1; pi := 3.143; 1; rho := 5.3808*10^14

0.6674300000e-7

 

0.2997924580e11

 

3.143

 

0.5380800000e15

(2)

diff(P(r), r) = -G*(rho*c^2+P(r))*((4*pi*r^3*(1/3))*rho+4*Pi*r^3*P(r)/c^2)/(c^2*(r^2-2*G*r*(4*pi*r^3*(1/3))*rho/c^2)), diff(v(r), r) = 1.485232054*10^(-28)*((4*pi*r^3*(1/3))*rho+4.450600224*10^(-21)*Pi*r^3*P(r))/(r^2-1.485232054*10^(-28)*r*(4*pi*r^3*(1/3))*rho)

diff(P(r), r) = -0.7426160269e-28*(0.4836021866e36+P(r))*(0.2254913920e16*r^3+0.4450600224e-20*Pi*r^3*P(r))/(r^2-0.3349070432e-12*r^4), diff(v(r), r) = 0.1485232054e-27*(0.2254913920e16*r^3+0.4450600224e-20*Pi*r^3*P(r))/(r^2-0.3349070432e-12*r^4)

(3)

condition; -1; P(0) = 0, v(1014030) = -.4283

P(0) = 0, v(1014030) = -.4283

(4)

``


 

Download maple_soft.mw

I found the solution of P(r) at P(0)=0, but could obtain the result of v(r) at v(1014030)=-0.4283, v(r) may have a graph such that i can goes from -0.4283 to 0.

I've posted  a code for a procedure, but it seems it does not execute with other versions of Maple the way it does with my version (5.4). Here is the link. I am curious to identify within the procedure code the cause of this divergence. Note: in 5.4 the code is preceded with readlib(eliminate).
 

I Have a problem with opening a document

When i open the document it shows a blanc document and this message 

no matter wich i choose, maple just shows a plain document.

 

Is there any solution to this problem?


 

 

Hi guys, i'm working on a problem using the runge kutta method (4). The problem is, when I run this program, with the given starting values, it perfectly calculates every value of x[w-i] except x[0] and i have no idea why. Can anyone help? Thanks!

Hello.

In maple you can use the interactive menu and choose what axes you want to look at the plot, ie. I choose Z axes and see the plot from above, can i do this by using syntax as a plot option?

 


 

restart; with(plots); with(Student[Precalculus]); with(LinearAlgebra)

S1 := x^2+y^2 = 4;

x^2+y^2 = 4

 

z = 2-x

 

F := Vector(3, {(1) = cos(z), (2) = x^2, (3) = 2*y}, attributes = [vectorfield, coords = cartesian[x, y, z]])

(1)

F := VectorCalculus:-Curl(F)

F := Vector(3, {(1) = 2, (2) = -sin(z), (3) = 2*x}, attributes = [vectorfield, coords = cartesian[x, y, z]])

(2)

g := [diff(rhs(S2), x), diff(rhs(S2), y)]

[-1, 0]

(3)

intergrand := -F[1]*g[1]-F[2]*g[2]+F[3]

2+2*x

(4)

``

Integrasjons område er projeksjonen på z=0 planet, her sirkel med radius=2

Intersection := lhs(S1) = rhs(S2);

x^2+y^2 = 2-x

 

{x = x, y = (-x^2-x+2)^(1/2)}, {x = x, y = -(-x^2-x+2)^(1/2)}

(5)

X := solve(rhs(Y[1, 2]))

-2, 1

(6)

plot3d([lhs(S1), rhs(S2)], x = X[1] .. X[2], y = rhs(Y[2, 2]) .. rhs(Y[1, 2]), color = [red, green]);

 

plot3d([lhs(S1), rhs(S2)], x = X[1] .. X[2], y = rhs(Y[2, 2]) .. rhs(Y[1, 2]), color = [red, green])

 

``


 

Download stokes_start.mw

I have a vector x of this type:

x :=Vector[column]([A__11*u__1+A__12*u__2+...+A__1m*u__m,

A__21*u__1+A__22*u__2+...+A__2m*u__m,

...,

A__n1*u__1+A__n2*u__2+...+A__nm*u__m]);

If I define u:=Vector[column]([u__1,u__2,...,u__m]), then it is clear that the equation has the form x=A*u.

I want to extract the matrix A, for the given vectors x and u.

IMPORTANT: I know I could create a loop (i=1 to m) and set u__i=1 and all other u__j=0 (for all j not equal i) and then reconstruct each column by this method, but it seems to be a overkill for such an easy problem.

I would be glad, if someone could show me a method how one can achive this in maple.

First 1013 1014 1015 1016 1017 1018 1019 Last Page 1015 of 2216