MaplePrimes Questions

When the solution is obtained in symbolic form, and then numeric values are assigned to variables, the answer is different from the numerical solution.


vol := -R^2*Pi*H*(-3*R*C^2*sin(theta)-3*H^2*cos(theta)^2*sin(theta)*R+6*R*C*sin(theta)*cos(theta)*H-sin(theta)*R^3+sin(theta)*R^3*cos(theta)^2+C^3-3*C^2*cos(theta)*H-cos(theta)^3*H^3+3*H^2*C*cos(theta)^2+3*R^2*H*cos(theta)^3+3*R^2*C-3*R^2*H*cos(theta)-3*cos(theta)^2*R^2*C)/(3*(H^2*cos(theta)^2-R^2+cos(theta)^2*R^2)^(3/2)):


V := (1/3)*Pi*R^2*H:


vp := Pi*h*R^2*(3*H^2-3*H*h+h^2)/(3*H^2):


eq := V-vp = vol;


va := theta = (1/6)*Pi, R = 2, H = 20, h = 14;


Symbolic solution:
sc := solve(eq, [C]);
evalf(subs(va, sc));
   [[C = 18.36540754], [C = 18.29805834 + 0.03888407898 I],  [C = 18.29805834 - 0.03888407898 I]]

Numerical solution:
eq1 := subs(va, eq);
evalf(solve(eq1, [C]));
    [[C = 20.91425055 + 4.492493739 I], [C = 20.91425055 - 4.492493739 I], [C = 13.13302314]]

Why this happens?
I am grateful for your attention.
Sinval Oliveira Santos.

hello people

I have this computation which has to do with my undergraduate project and each time I compute some work (vary parameters), it seems to evaluate forever. although my computer isn't recent and has 2GB of RAM the computation didn't seem to me as much of a task for it. computation works fine with some parameters as 0 but the moment I change it to a natural number, it evaluates forever.

Is there anyway I could speed up computation in maple? or do I just need a faster computer? but I have a dead line for next week. can I upload my worksheet for someone here to help me execute? 

thank you in advance. 

Hello everybody,

 

my question concerns the visualizing possibilities of maple:

can maple visualize complex functions? (f(z): C->C)

If so, which possibilities do i have und what is the command for it? Maybe as a coulour diagram, as a vector field (f(x): R^2->R^2) , or as mapping of sets (e.g. curves, grids into new curves and curved lines)?

 

 

 

Thanks in advance

regards

Nikita

 

PS: I am using maple 18.

Hello,

 

I would like to unassign all variables at once without restart, as I do not want to have to reload packages again. Is this possible without having to unassign each variable individually?

 

Thanks,

 

Patrick

I am trying to see how do I have initial conditions in a system of differential equations. This is an example problem, which doesn't work. What is wrong? Thank you.

I am looking to extract exponents from a sum of products of three variables A, B and C. An example being:

f:=5*A^4*B^3*C^7   +   3*A^2*B^1*C^7  +  31*A^3*B^6*C^11  + ...

I used the following procedure to extract the exponents of each variable:

Exponents:= proc(p, x::name)
    local
    t;
    coeffs(p,x,t);
    map(degree, [t], x)
end proc:

This works great and will extract the powers for each term:

Exponents(f,A):        [4,2,3]

Exponents(f,B):        [3,1,6]

However, when the exponents are the same it does not count them twice. An example of this being with the variable C above where two of them have an exponent = 7 and it only counts it once.

Exponents(f,C):        [7,11]

Is there a simple way to modify the procedure to list the powers regardless of if they appear more than once?

Many thanks in advance.

I want to make a package that I have created work with the LinearAlgebra package that comes with Maple. My package loads into a worksheet fine, but when I try to use one of my procedures, most of which depend upon procedures in the Linear Algebra package, the executable part of my procedure from my package is simply echoed to the screen and not executed. If I then copy the echoed part to a command prompt then it executes fine. How do I make my package use the commands in the Linear Algebra package?

Hello!
Try to consider the following system of differential equations:

sys := diff(U(ksi), ksi) = (y(ksi)-(1.5*(1+0.01*ksi))*U(ksi)/ksi)/(1.5+0.015*ksi+0.002*ksi^2),
diff(y(ksi), ksi) = U(ksi)*(0.002+(1.5*(1+0.01*ksi))*(0.002*ksi^2)/(ksi^2*(1.5+0.015*ksi+0.002*ksi^2))-19.3^2)-y(ksi)*(0.002*ksi^2)/(ksi*(1.5+0.015*ksi+0.002*ksi^2))

with the boundary conditions: cond:= y(0.8) = 0, y(1) = 0

And Maple gives me zero solution for this system , i mean U(from 0.8  to 1) = 0 and y(from 0.8 to 1) = 0

How can i get some other solutions?


P.S. i need numerical solution => dsolve( [sys,cond],type= numeric)

Please, i need some help.

I want to calculate this limit

limit((b^(d+1)-1)/((b-1)*b^d), d = infinity)

but it always return limit((b^(d+1)-1)/((b-1)*b^d), d = infinity)

 

Is it becaus it cant recognize what b symbol is ?

Another easy question from a newbie:

Say I have a procedure which, along the its execution, needs to pass a parameter to a different procedure (which, in this case, would be a subroutine) to be elaborated and returned to go on.

This process may happen a few times during the execution and the passing parameter, which may have the same name but different value, needs to be worked on by the subrooutine.

My question is: how do I invoke a procedure from a parent procedure passing one or more parameters and have them returned?

Thank you

Hi,

I am trying to use implicit plot. The plot is OK but I want to put labels such as what Latex produces :

$\frac{\Omega}{\omega_n}$ for x axis and $a_0 \mathrm{(m)}$ for y axis

How can I apply this in my maple code as below:

plot1:=implicitplot(a3, Omega_r=1.5..2.5, a=0.00000001..0.1, labeldirections=[horizontal, horizontal], axes=boxed, labels=["W/w_n",typeset("a_0 (m)")], labelfont=[SYMBOL]):

What I have put as bold does not work for me, it is making everything in Greek :) . I want combination of Greek and math.

 

Thasnks,

Bahareh

 

 

 

 

I am trying to design a question, where studenst have to find the equation of a linear function given its graph. For this to work, I have to be able to draw gridlines, which for some reason is not possible in Maple TA with the ordinary plot function. I know it should be possible using an applet; given the problems this is going to create with all the different browsers, however, this is not a viable solution. I have found another solution which is unreasonably complex but should work. The problem is that sometimes it doesn't work. When I press Refresh algorithm preview in the Question Designer I get "Broken Maple plot. Verify your plot statement" roughly every third time I refresh the preview. Any help would be greatly appreciated.

 

The algorithm is here:

$a1=range(-4,4,1);
$a2=range(1,4,1);
condition:not(eq($a1,$a2));
$px=range(0,5,1);
$y0=range(0,5,1);
$x0=if(gt($a1,0),$px,-$px);
$f=$a1/$a2*(x-$x0)+$y0;
$G=plotmaple("
 plots[display](
  [plots[coordplot](cartesian, [-10 .. 10, -10 .. 10], grid = [11, 11], color = grey),
   plot($f, x = -10 .. 10, y = -10 .. 10, color = [green, blue, red], thickness = 2, tickmarks = [[1], [1]], labels = [``, ``]),
   plots[textplot]([0, 10, 'y'], align = {above, right}),
   plots[textplot]([10, 0, 'x'], align = {above, right})
  ],
  labels = [``, ``], axes = normal, view = [-10 .. 10, -10 .. 10]),
 plotoptions='width=350,height=350'");
$g=gcd($a1,$a2);
$at=$a1/$g;
$an=$a2/$g;
$a=if(eq($an,1),$at,$at/$an);
$ans=$a*x+($y0-$a*$x0);

Hi!

This question is related to http://www.mapleprimes.com/questions/204419-Derivatives-Of-Splines-Are-Not-Defined and http://www.mapleprimes.com/questions/42114-Problem-With-Spline-Integrating , however I have not been able to apply the solutions given there to my problem.

I have a set of points given by

and certain function value points given by

where e1 is the function I am approximating.


Using

I come up with my piecewise function.

When I do diff(e4,x), however, the points at the nodes show "float(undefined) x=0.2..."(the node).

As it turns out, the value of the derivative on the left of the node is not equal to that of the right side by a factor of 10^(-7), in other words, numerically unimportant but high enough for maple to realise it is not the same number. How could I tell Maple that I am happy choosing, for example, the value given by the function on right side of the node?

I welcome any suggestions.

Many thanks in advance.

Every time I try to write a procedure I get stuck.

This time is no different:

restart;

global a:=0.081819221, PI:=3.1415926535897932384626433832795;
Ecce:=proc(lt)
lat:=lt*(PI/180);
b:=((1-a*sin(lat))/(1+a*sin(lat)))^(a/2));
t:=ln((tan(PI/4)+lat/2));
d:=3437.7468*t*b;
return d;
end proc;

I digit the following to get a result
Ecce(45.2112);

and this is what I get (in blue)
Ecce(45.2112)

Every single time. I can never have a procedure that works right away. It's getting on my nerves

First 1242 1243 1244 1245 1246 1247 1248 Last Page 1244 of 2429