MaplePrimes Questions

Hello I am a Maple 15 user and I am using the command fsolve to solve for the intersection of two curves over a specified interval in x, namely from 0 to the lim defined in the Maple document. The specified interval contains asymptotes and when I specify the full interval only one of the three solutions is returned even if I can see that there are three distinct solutions by looking at the plot of RHS and LHS. Should I use another technique to find the solution or is my implementation of fsolve command wrong?

Thanks in advance


restart

with(ListTools):

n1 := 1:

n2 := 1.50:

n3 := 1.40:

lambda := 1.3:

k0 := 2*Pi/lambda:

d := 3:

x0 := k0*d:

arg1 := sqrt(x0^2*(n2^2-n1^2)):

arg2 := sqrt(x0^2*(n2^2-n3^2)):

lim := FindMinimalElement([arg1, arg2]):

sqr1 := sqrt(x0^2*(n2^2-n1^2)-x^2):

sqr2 := sqrt(x0^2*(n2^2-n3^2)-x^2):

LHS := tan(x):

RHS := (sqr1+sqr2)/(x*(1-sqr1*sqr2/x^2)):

plot([LHS, RHS], x = 0 .. lim, y = -6 .. 6)

 

fsolve(RHS = LHS, x = (1/2)*Pi .. 3*Pi*(1/2))

2.634254816

(1)

fsolve(RHS = LHS, x = 3*Pi*(1/2) .. 9*Pi*(1/4))

5.222527128

(2)

fsolve(RHS = LHS, x = 9*Pi*(1/4) .. lim)

7.598486053

(3)

``


Download HW4Q2.mw

Hey guys,

i'd like to create a custom component for maplesim. I opened the template in maple18 and defined the following equations:

eq := [p(t) = p__0+rho*g*h(t), Q(t) = A*(diff(h(t), t)), L(t) = 100*h(t)/h(0)]

These equations describes a tank with a liquid in it. Now I tried to define a function L(t) (above) that gives the level of the tank in percentage. Therefore I need the initial height value at t=0. The function defined above (h(0)) does not work, cause maple tells me that the function does not exist.

Any hint how to get an initial value or a value at t=0? Or maybe another way to solve my problem?

Hopefully I described right. :-)

Best regards

Christian

Hello!

 

I'm pretty new to Maple and I can't figure out how to input angles in degrees and radians in Maple 16 and in Maple Calculator.

 

E.g. How could I type 58 degrees, 28 minutes, 18 seconds?

 

Thanks in advance for your help!

 

puckie62

How can I compute KroneckerProduct of two matrices in maple 18 ? Any help is appreciated in advance.

Hey guys.

Basically I want to tranverse the syntax tree, replace an indexed expression based on some rule, then return the modified expression. Here is what I am trying to do. Psuedo code below --

applyRule(expr)
   if isSymbol(expr) then
       return expr;
   elif isIndexed(expr) and ruleSatisfied then
       return modified_expr;
   else
      # Apply operator on the sub-expressions
      # This is the part im having trouble with
      return op(0,expr)(op(map(applyRule, [op(expr)])));
   end if:
end proc:

The line marked with the comment above works MOST of the time, but it'll fail for indexed objects (A[i,j] becomes A(i,j)). The unapply function looked promising, but that also has some corner cases (e.g. if I try to deconstruct the expression A = B*C it will fail)

Kind regards,

woggy

I'm trying to resolve a differential equation system and plot it. But when I use the "odeplot" command, just appear the words in blue and there's no graphic. Does anyone know whats happening?

 

Dear all;

Thank you very much is you can make the computation using maple.

I have this system:

x'(t)=x*y-x^2*y+y^3;

y'(t)=y^2+x^3-x*y^2;

I would like to make to change the system in another system using polar coordinate: like x=r*cos(theta) and y=r*sin(theta), and then derive a simple system: r'=F(r, theta) and theta'=G(r, theta), where here F and G are two unknowns functions. 

Many thinks if someone can help me using a Maple code. 

 

Hello everyone.

I have lots of lengthy equations in Maple that I don't want to waste time for rewritting them. I am looking for a clean and tidy way to export these equations from Maple and import them into a LaTeX or Word document.

As an example do it with the equation in the following file.

Example.mw

Many many thanks.

I'm importing a STL geometry with plottools[importplot].

The result is a PLOT3D data structure. Applying "op" to the structure reveals that it is formed by POLYGONS structures.

How can I import the same STL geometry, and, instead of getting a POLYGONS structure, getting a POINTS structure?

I think it should be direct for Maple, because in the plot view configs one can select the style to be surface, contour and even point.

If the conversion has to be by hand, does someone know a not too painful method? For me it's being painful, as I'm trying a solution all the day.

I am numerically solving a nonlinear system of nine equations. How long can I expect it to take?

I have run it for 30 minutes and it has not solved yet.

Here is the system of equations:

0=Lambda-mu.*S-beta.*(H+C+C1+C2).*(S./N)-tau.*(T+C).*(S./N);

0=tau.*(T+C).*(S./N)-beta.*(H+C+C1+C2).*(T./N)-(mu+mu_T).*T;

0=beta.*(H+C+C1+C2).*(S./N)-tau.*(T+C).*(H./N)-(mu+mu_A).*H;

0=beta.*(H+C+C1+C2).*(T./N)+tau.*(T+C).*(H./N)-(mu+psi.*mu_A+mu_T+lambda_T).*C;

0=lambda_T.*C-(mu+mu_A+rho_1+eta_1).*C1;

0=rho_1.*C1-(mu+mu_A+rho_2+eta_2).*C2;

0=eta_1.*C1-(mu+rho_1+gamma).*CT1;

0=eta_2.*C2-(mu+rho_2+gamma.*(rho_1)./(rho_1+rho_2)).*CT2+(rho_1).*CT1;

0 = N - S - T - H - C - C1 - C2 - CT1 - CT2;

and I have numeric values for Lambda, beta, tau, mu, mu_T, mu_A, rho_1, rho_2, psi, gamma. The only parameters left are eta_1, eta_2.

Thank you.

How is vertical text created in a plot?  It would be similiar to using the labeldirection option set to "vertical", but my text in question will be an annotation within the field of the plot.  A more general question would be how to place rotated text within a plot.    

Hi everyone.

I wrote simple program with several functions. I would like to obtain parallel computing of my functions. I can't understand how to use nodes.

My programm.

Simple_example.mw

When I input

cos(k*Pi) assuming k::odd

The result is -1

but

(-1)^k assuming k::odd

The result is (-1)^k

Why doesn't the second expression work?

 

AOA... How are you all. I need the answer of the following question.

 

input in Maple: expand(exp(a+b)+exp(c+b))

output:  exp(a)*exp(b)+exp(c)*exp(b)

and

input in Maple: expand(exp(2a+b)+exp(3c+b))

output:  (exp(a))^2*exp(b)+(exp(c))^3*exp(b)

but i need exp(2a)*exp(b)+exp(3c)*exp(b)

 

PhD (Scholar)
Department of Mathematics

Say for a complicated function f(x), there are 10 solutions. I want to check for any of the solutions, the matrix R is defined or not.

 

Is there a way to force execution like the following ones?

seq(1/i,i=0..3);

for i from 0 to 3 do
    1/i;
end do;

 

I think the problem is that, Maple stops immediately when it's undefined. But the following terms could be defined.

Or is there a way to put this check into "solve"? That's

> solve(f(x),x, "some way of making sure that the solution has to be defined for the matrix R" )

 

 

Is there a way to achieve this?

Thanks

First 1358 1359 1360 1361 1362 1363 1364 Last Page 1360 of 2429