Maple 2015 Questions and Posts

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

This is a stripped down example of something I've been doing. Basically I'm building matrices which I then, using unapply, convert into functions of some variables of t.
.... but found that simplify seems to often not work as i'd wish.
 

restart:
mm:=Matrix([[cos(sqrt(g__1^2)*t), (-I*g__1*sin(sqrt(g__1^2)*t))*(1/sqrt(g__1^2))], [(-I*g__1*sin(sqrt(g__1^2)*t))*(1/sqrt(g__1^2)) ,cos(sqrt(g__1^2)*t)]]);

#great - simplifies as i'd expect:
simplify(mm) assuming g__1::positive;

Do the same thing but when matrix is a function of t
mmFun:=unapply(mm, t);

#the function works - gives what i'd expect
mmFun(3); mmFun(t);

#but now the simplification does not work - why the g__1 in the argument of cos does not get properly simplified?
simplify(mmFun(t)) assuming g__1::positive;

Any ideas if this is a bug? I'm using maple 2015.2 on linux 64-bit.

here is the worksheet: simplify_issue.mw

thanks

EDIT:

as a side note once can sometimes overcome this with mapping simplify  as in :

map(simplify, resultMatrix ) assuming g__1::positive;

but this is not optimal, and sometimes does not work when i first multiply the matrix by say a vector.

 

 

 

hi...amount of Determinant  is infinity?how i can remove this bad calculation ?

thanks...mode_shape2.mw

hi .by changing amount of variable such as '' f '' or 'D5 ' in input data, not changing  in final result!!!!please chek attached file 

thanksX4.mw

Consider the well-known Euler's formula  

 eix = cos x + i sin x   

When we calculate that for  x = π  we get:

eiπ = cos π + i sin π   or

eiπ = −1 + i × 0   (because cos π = −1 and sin π = 0)  or

eiπ = −1  or  eiπ + 1 = 0

It seems absolutely magical that such a neat equation combines  5  fundamental constants: e ,  i ,  π , 1 , 0

The purpose of this post - to give a simple visualization of equality  eiπ = −1  (statical and animated) by expanding  eiπ  in a series of complex numbers. These numbers we represent as vectors in the plane. We will see that the partial sums of this series are broken lines like a spiral, twisting around the point -1 steadily approaching to it.

Euler procedure has one required parameter  n is positive integer - the number of displayed terms of the series  for  eiπ  

Optional parameter  a  is any symbol (by default  a=NULL). We use this option if  instead of a static spiral want to see an animated spiral. 

Procedure code can be found in the attached file  Euler.mw

 

Examples of use.

The first example shows  8 terms of the series (broken line of 8 units):

Euler(8);

                

 

 

The terms of the series where  n> = 10  on the same plot can not be seen as very small. In this case, we use  the second plot with magnification of  100 : 1 .  

The second example:

Euler(14);

 

 

 

In the third example, we see an animated broken line. It's  first 9 units represented  on the left plot, and then for n> = 10 on the right plot:

Euler(13, a);

  

 

Euler.mw

Can somebody help me to find the solution?

I think there is something wrong with the definition of bvw1. If I use dsolve (in soln) with only bvw as Initial Condition,

I get a solution but if I also insert bvw1 as an Initial condition soln won't appear.

Here's what's written in the image:

'Imagine the course of a planet around a star with L=0.5 and e=0.7'

Solve Keppler's differential equation with Initial Conditions:'

hi.please remove error in attached file

thanks...gfhf.mw

In this paper we will demonstrate the importance of using simple to complex algorithms applied to complex systems in civil and mechanical engineering. In order to develop solutions that developers need to be involved in issues of advanced dynamic computer science. We show how is that with the Maple scientific program and through component-based algorithms can generate power then then be inserted into specific algorithms. Will form patterns with movements of rotation and revolution of their axes, in each case to model and analyze the curves thereof comprising. With these modelalos and curve analysis we can predict manufacturing costs, freight, inter alia estrcturas which they can be used with the correct use of Maplesoft.

 

IX_Fast_2016.pdf

Solid_Algorithms_applied_in_complex_3D_structures_for_Civil_Engineering_with_Maplesoft.mw

(in spanish)

Lenin Araujo Castillo

 

 

 

 

Hello people in mapleprimes,

I have a question about how Int does.

The following function spy returns 0, of course, with a side effect of listing the value of x one by one to secrets.

secrets := NULL:

spy:=proc(x::{name,numeric})
  global secrets;
  if type(x,name) then
    return 'procname'(args)
  else
  secrets:=x,secrets;
  return 0;
  end if;
end proc;

 

And, with this function, calculation of the Int, that is, following brings a sequence of numbers:

evalf(Int(spy,0..1));

secrets;

.7506605773, .2493394227, .9118140517, 0.881859483e-1, .9970470440, 0.29529560e-2, 1.0000000000, 2.2449529449*10^(-11), .5000000000

 

The question I have is why the number of this sequence is not from smaller( or greater) to greater (smaller) in order,

but in random order. And, numerical calculation of Int can be done with only 9 points extracted?

 

Best wishes.

taro

 

 

 

 

 

This post is my attempt to answer the question from here .  

The procedure  ContoursWithLabels  has 2 required parameters: Expr  is an expression in  x  and  y  variables,  Range1  and  Range2  are ranges for  x  and  y . In this case, the output is the list of floats for the contours and 8 black contours (with labels) (the axis of coordinates as a box). 

The optional parameters: Number is positive integer - the number of contours (by default Number=8),  S is a set of real numbers  C  for contours (for which Expr=C) (by default  S={}),  GraphicOptions  is a list of graphic options for plotting (by default  GraphicOptions=[color = black, axes = box]),  Coloring  is an equality  Coloring=list of color options for  plots[dencityplot]  command (by default Coloring=NULL). 

The code of the procedure:

restart;

ContoursWithLabels := proc (Expr, Range1::(range(realcons)), Range2::(range(realcons)), Number::posint := 8, S::(set(realcons)) := {}, GraphicOptions::list := [color = black, axes = box], Coloring::`=` := NULL)

local r1, r2, L, f, L1, h, S1, P, P1, r, M, C, T, p, p1, m, n, A, B, E;

uses plots, plottools;

f := unapply(Expr, x, y);

if S = {} then r1 := rand(convert(Range1, float)); r2 := rand(convert(Range2, float));

L := [seq([r1(), r2()], i = 1 .. 205)];

L1 := convert(sort(select(a->type(a, realcons), [seq(f(op(t)), t = L)]), (a, b) ->is(abs(a) < abs(b))), set);

h := (L1[-6]-L1[1])/Number;

S1 := [seq(L1[1]+(1/2)*h+h*(n-1), n = 1 .. Number)] else

S1 := convert(S, list)  fi;

print(Contours = evalf[2](S1));

r := k->rand(20 .. k-20); M := []; T := [];

for C in S1 do

P := implicitplot(Expr = C, x = Range1, y = Range2, op(GraphicOptions), gridrefine = 3);

P1 := [getdata(P)];

for p in P1 do

p1 := convert(p[3], listlist); n := nops(p1);

if n < 500 then m := `if`(40 < n, (r(n))(), round((1/2)*n)); M := `if`(40 < n, [op(M), p1[1 .. m-11], p1[m+11 .. n]], [op(M), p1]); T := [op(T), [op(p1[m]), evalf[2](C)]] else

if 500 <= n then h := floor((1/2)*n); m := (r(h))(); M := [op(M), p1[1 .. m-11], p1[m+11 .. m+h-11], p1[m+h+11 .. n]]; T := [op(T), [op(p1[m]), evalf[2](C)], [op(p1[m+h]), evalf[2](C)]]

fi; fi; od; od;

A := plot(M, op(GraphicOptions));

B := plots:-textplot(T);

if Coloring = NULL then E := NULL else E := ([plots:-densityplot])(Expr, x = Range1, y = Range2, op(rhs(Coloring)))  fi;

display(E, A, B);

end proc:

 

Examples of use:

ContoursWithLabels(x^2+y^2, -3 .. 3, -3 .. 3);

                             

 

 

ContoursWithLabels(x^2-y^2, -5 .. 5, -5 .. 5, {-20, -15, -10, -5, 0, 5, 10, 15, 20}, [color = black, thickness = 2, axes = box], Coloring = [colorstyle = HUE, colorscheme = ["White", "Red"], style = surface]);

                           

 

 

The next example, I took from here:

ContoursWithLabels(sin(1.3*x)*cos(.9*y)+cos(.8*x)*sin(1.9*y)+cos(.2*x*y), -5 .. 0, 2 .. 5, {seq(-2 .. 2, 0.5)}, [color = black, axes = box], Coloring = [colorstyle = HUE, colorscheme = ["Cyan", "Red"], style = surface]);

                                 

 

There are many more examples can be found in the attached file. 

ContoursWithLabels1.mw

 

Edit. The attached file has been corrected.

Hi,

I recently noticed that Maple 2015 has become irresponsive on mac (macbook pro) with the latest java release (Java 8 update 66). Did anywone experience the same problem ?

I have functions like

g := (y, t)->sin(y(t))

diff(g(y, t), t) # ok

How to determine the derivative below with maple :

diff(g(y, t), y(t))

Thanks

Iam a newbie, just two weeks into my 30-days trial. I have been exploring the symmetry aspect of PDEtools, gone through materials in the help section but still having problem in some of my analysis. The answer to the titled question "Symmetry analysis with parameters" was really helpful but did not work out for me when the parameters are more than one. Attached is a sample question.

sample_question.mw

 

hi.for linear coupling equation

dsys3 := {-72.49829200*(diff(f1(x), x, x))+0.8377580411e-2*(diff(f2(x), x))-8.873545400*10^9*(diff(f3(x), x))+2.114533515*10^18*f1(x), -878.8477313*(diff(f2(x), x, x))+1.590065471*10^20*f2(x)-7.353421206*10^(-26)*(diff(f3(x), x, x))+4.891459762*10^10*f3(x), 4.027667395*10^(-20)*(diff(f3(x), x, x, x, x))-0.6274394007e-2*(diff(f3(x), x, x))+8.873545401*10^9*(diff(f1(x), x))-7.352113720*10^(-26)*(diff(f2(x), x, x))+4.904509456*10^10*f2(x)+1.208381068*10^19*f3(x)-2.499990383*10^26*omega*(diff(f3(x), x, x))}

by assuming and to expand these functions(f1-f2-f3) in polynomial form(e.g. Chebyshev, power polynomials, Legendre and etc).:

f1(x):=(&sum;)H[i] *(e)^(lambda[i] *x); f2(x):=(&sum;)alpha[i]*H[i] *(e)^(lambda[i] *x);f3(x):=(&sum;)GAMMA[i]*H[i] *(e)^(lambda[i] *x)

 

how i detemine lambda[i] which are roots of the  characteristic equations?in other word how i can build characteristic relation for coupling equation?

2)how i can gain value for alpha[i] and GAMMA[i]

by using equation

Q1 := subs(x = 0, sum(H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q2 := subs(x = L, sum(H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q3 := subs(x = 0, sum(alpha[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q4 := subs(x = L, sum(alpha[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q5 := subs(x = 0, sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q6 := subs(x = L, sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); M := diff(sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8), x); Q7 := subs(x = 0, M); Q8 := subs(x = L, M)

????

thanks...

 

chebyshev.mw

When executing the following orders,

 

a:=0.006:

convert(a, symbol);

 

the result is .6e-2.

 

How to make Maple return the form 0.006, just as the original?

I am trying to solve 4 nonlinear equations for four variables using fsolve  and the output that i am getting is basically the same equations repeated after some time.  I even tried reducing one of the equations using assumptions from my side but it results in same behaviour..  Quite new to maple, would like some advice as to this behaviour. Thanks

 Here's the file

fsolve_1.mw

 

PS- using do loop is part of the solving so i cannot remove that

First 55 56 57 58 59 60 61 Last Page 57 of 71