Items tagged with value value Tagged Items Feed

In the old version of Maple, the accurate value of Sin()and Cos() at some particular points, such as Pi/10, can be returned as below:

 

But in Maple 18, it just returns the same as the input.

How to make Maple18 return the accurate value as before?

Hello Hello everybody 
   I have to solve the following differential equation numerically 


``

 

restart:with(plots):

mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :

eq1:=(mp+mb)*diff(x(t),t$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))-F*sin(omega*t)=0;

1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0

(1)

eq2:=(mp+mb)*diff(z(t),t$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)-F*sin(omega*t)=0;

1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0

(2)

eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+[Ip+mp*l^2+mp*d*l*cos(alpha(t))]*diff(alpha(t),t$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;

587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0

(3)

eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+(Ip+mp*l^2)*diff(alpha(t),t$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t$1)^2*sin(alpha(t))=0;

540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0

(4)

CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0

(5)

solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

 

 

I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

Help pleaase!

thank you !!!

Download systéme_complet.mw

 

Hi,

I have these lines in my code, the function alpha:=(m,n,1)->...... is defined in the last line of the code below, but when I want to calculate alpah(1,1,1), there is no numeric value. Why????  Many thinks

 

 restart:
with(LinearAlgebra):
with(plots):
with(PDEtools):
with(IntegrationTools):
interface(rtablesize=20):
d:=1: N:=2: a:=1: h:=a/N:
Kernel(x,y):=ln(abs(x-y)):

 eq2:=int(Kernel(x,y)*phi(y),y=-a..a)=sum(int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h),n=-N..N-d):

Approximate the integral
eq3:=phi->int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(beta[i,n]*phi((n+i-1)*h),i=1..d+1):
eq4:=int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(alpha[m,n,i]*phi((n+i-1)*h),i=1..d+1):

Compute the coefficients  beta[i]

Vct_basis:=[seq(x^i,i=0..d+1)]:
fct:=[seq(unapply(Vct_basis[i],x),i=1..d+2)]:


sys:=[seq(eq3(fct[i]),i=1..d+1)]:
x:=m*h:
w := [seq(beta[i,n],i=1..d+1)]:
M,b := GenerateMatrix(sys,w):

M1:=-M: V:=-b:

Vect_beta:=(M1)^(-1).V:# Vect_beta is a vector.

beta[1]:=Vect_beta[1]:  
alpha1:=(n,m)->beta[1];
(n, m) -> beta[1]
alpaha(1,1);
                                alpaha(1, 1)  ??????????????????? No numeric result


Hi,

I have a code compute some function : 

         alpha1:(n, m,1) -> (n + 1) (int(K(|m h - y|), y = n h .. (n + 1) h))

              int(K(|m h - y|) y, y = n h .. (n + 1) h)
            - -----------------------------------------
                                  h                    
         alpha2:  (n, m,2) -> -n (int(K(|m h - y|), y = n h .. (n + 1) h))

                int(K(|m h - y|) y, y = n h .. (n + 1) h)
              + -----------------------------------------
                                    h                    
and  I have a Matrix "MatA" .

 

 

My aim, when I give the value of the Kernel K used in alpha1, and alpha2, like K(x,y)=ln|x-y| , I want a numerci Matrix.

How can I do it.

Many thinks.

Fred.mw

 

Hi all

How to read a value from keyboard of PC when executing a maple document and assign it to a variable ?

Thanks

After simulate the model of MapleSim, I can only know the curve of where I need to know about. I need the specific parameter(each point value), like a piece of sheet. How I can put it of in an Excel of Word?

Hi,

I have a problem with export value from module.

Could you somene check?,

Thank's in advance.

 

test.mw

 

wz

Dear all

 

I want to display the value of k   for which the stop test is verified. Thanks for your help. 



epsilon:=(y0,N)->evalf(abs(

 testerror:=array(1..75);
for k from 2 by 2 to 50 do
testerror[k]:=data[RK3][k][2];
if testerror[k]<=0.0001 then break; end if; end do;

Respected sir,

     Maple package is very useful to all the Mathematics students to work with. however, i came to know how to solve

system coupled non-linear ODEs with boundary condtions in Maple 12.0. But my doubt is, the tool 'Boundary value problem solver' which methods and submethods are used to solve those BVPs. Sir please, clear my doubt. your response is highly helpfull for me. Please kindly do the need full.

Thanking you.

Hello, could you give me ideas with such challenge? I have created my model in MapleSim and want to check correctness of the scheme. I need to get values of block variable. by default maplesim displays results as a graph and i do not see what is real value. How I can get these values? 

Why does the following statement not evaluate, or better yet, how can I make it do so?

 

A:=value(floor(p)) assuming p>0,p<1,p::real;

or

A:=simplify(floor(p)) assuming p>0,p<1,p::real;

or any one of a lot of different attempts along the above lines, all of which seem (to me) that they should yield

A:=0

rather than

A:=floor(p)

which is what I get.

Thanks in advance

Hello,


First of all, I've searched already a bit around, but couldn't find a similar topic, so I thought I'd open a new one. Also, English isn't my main language, so terminology may be wrong, but I hope you'll still understand what I want to say.

So, I have this procedure:

restart;
functions:= proc(n)
local L, list, p, f, sum, i, part, g, normg, x:
L:=1/sqrt(2):
list:=[L]:

for p from 2 to n do
f := x**(p-1):
sum := 0:

for i from 1 to (p-1) do
part:= int(list[i]*f*(x+1),x=-1..1)*list[i]:
sum := sum + part:
end do:

g:= f-sum:
normg:= sqrt(int(g^2*(x+1),x = -1..1)):
L:=g/normg:
list := [op(list), unapply(L,x)]:
end do:
list;
end proc:

What this procedure does, is calculating n orthonormal functions (but that doesn't really matter here). The result is a list of functions, or should be. What I get when I enter e.g. functions(5), is a list of very weird functions with 'nexpr' and more, instead of some polynomials.
When I replace the 'unapply(L,x)' in the 4th last line by just 'L', I do get the correct expressions, but I can't manage to calculate the function values for those. The expression just gets returned. By the way, I can't do that in the situation before the edit either.

So what I eventually want to do, is calculating some function values for each function in the list, or (if this isn't the right terminology) in Maple code e.g.:

f:= x -> x^2 + 3*x;
f(3);
(The result should be 18 in this case)

Could someone help me? :)

Jeroen

I have two procedures X() and P() which both are working. (See attached worksheet )

LL_100)_Quandl_Get_D.mwLL_100)_Quandl_Get_D.mw

When I put:

z := X(P());
Do(%DataTable0 = z);

I get an error:

Attempted to set unknown property 'value' on component 'DataTable0'

why??

Hi there!

I want to improve the way I code up my procedures. For instance I want to code them safe in the sense that they only accept the arguments when they have the correct type.

I know that in principle this is done with the double-colon operator in the following way:

proc(argument::argumenttype)::valuetype;

 

(Q1)Now, given that my argument is of a type such as set, list, Array, etc.:

(a) How would I specify the allowed types of the elements of that list (for all elements, and for specific ones)? And if the element of the list is a list again, how would I specify the type of that's elements? and so forth..

(b) How would I specify the allowed size of the listArray, etc. ?

 

(Q2) How do I specify the types of more than one output, if my proc returns more than one value?

 

(Q3) I know that there are special integer types, such as nonnegint, posint, negint. Is there also a way to specify that the ineger (or float) argument has to be greater than some given value, e.g. >2, or that it has to lie between two values, or out of a given set?

 

Thats all for now. Thanks for your help guys! : )

Gernot

Hi

I have entered two functions and got a solotion for them:

Now i want to know if there is someway Maple can do this automaticly:

 

So that i not have to do like i did here, manuel copy-paste the values into the function, or re-enter them.

 

Using Maple 17.02 on Windows 64-bit, but i guess that makes no differance, since it's java :) 

 

Try makeing it simple, i'm new with Maple.

 

Thanks in advance!

Emil Kristensen

 

1 2 3 4 Page 1 of 4