MaplePrimes Questions

Is there a way to apply op to an expression and get back every possible operand and the corresponding list value?  I sometimes don't know how far to go with a list of inputs to get what I want.

Dear all.

I am a french ingineering student and I have some problems trying to modelize the ascension of a space balloon (closed balloon full of Helium) from 0 to 11000m in ISA conditions.

I think that my initialization is OK but I'm unfortunately not able to find how to solve my non linear equation. My equation is: ` ρ`[air]*V[Ballon]*g = mg+(1/2)*rho[air]*C[x]*V[z]^2

I copy my work below:

###############################################################################

#Atmospheric parameters, initialization
#temperature (K)

Ta := 15-6.5*((1/1000)*z(t))+273.15;

#pressure (Pascal)

 

 Pa := 1013*10^2*(1-3.32*10^(-5)*z(t))^(7/2);

#moleculai mass of air

 

M := 29;

#thermodynamic constant

R := 8.314;

#volumic mass of air following the altitude

 

J := M*Pa/(R*Ta);

#Laplace coefficient, initial volume of the balloon, ground pressure:

 

ga := 1.6665;

V0 := 4.43;

P0 := 1.013*10^2;

#Balloon volume following the altitude (Laplace formula)

 

Vball1 := (P0/Pa)^(1/ga)*V0;

#Disc surface for the drag force

S1 := 3.14^(1/3)*(3/4)^(2/3)*Vball1^(2/3);

with(DEtools);

Cx := .44; #(turbulent flow)

g := 9.81;

mball := 3; #(balloon mass)

ode1 := J*Vball1*g-mball*g-(1/2)*J*S1*Cx*(diff(z(t), t))^2 = 0;

ics := (D(z))(0) = 0, z(0) = 0:

dsolve(????????);

###############################################################################

The problem is that because of its non linear aspect, i don't know what kind of method I have to use to find the solution with my initial conditions. 

Thank you in advance for your answer, 

ANTHONY 

hi all,

 

Im trying to plot an exponential function which has 2 variables times a constant coefficient. like A*exp(-f(x,a))

When A gets larger, maples fials to plot a smooth curve! how can I solve this problem? 

please see the attached file. If rho grows to 0.9, in the first line, you can see when it gets bigger, the cosnstant coefficient of Eq. (7) gets larger rapidly and the plot goes crazy! 

sz2012_4m.mw

Sorry for disturbing you. I am wondering if there is an easier approach in Maple that could convert a system of second order differential equations into matrix form. Of course, we could do it by hand easily if the degrees of freedom is small. I would like to know if we could use Maple to do so. 

Here is an example with 6 degrees of freedom: the variables are u, v, w, alpha, beta and gamma. And, this is a uncoupled system.

Vector(6, {(1) = 2*R^2*(diff(w(t), t))*Pi*Omega*h*rho+R^2*(diff(u(t), t, t))*Pi*h*rho-R^2*u(t)*Pi*Omega^2*h*rho = 0, (2) = R^2*(diff(v(t), t, t))*Pi*h*rho = 0, (3) = -2*R^2*(diff(u(t), t))*Pi*Omega*h*rho+R^2*(diff(w(t), t, t))*Pi*h*rho-R^2*w(t)*Pi*Omega^2*h*rho = 0, (4) = (1/4)*R^4*Pi*(diff(alpha(t), t, t))*h*rho+(1/12)*R^2*Pi*(diff(alpha(t), t, t))*h^3*rho+(1/6)*R^2*Pi*(diff(gamma(t), t))*Omega*h^3*rho-(1/12)*R^2*Pi*alpha(t)*Omega^2*h^3*rho = 0, (5) = (1/2)*R^4*Pi*(diff(beta(t), t, t))*h*rho-(1/2)*R^4*Pi*beta(t)*Omega^2*h*rho = 0, (6) = (1/4)*R^4*Pi*(diff(gamma(t), t, t))*h*rho+(1/12)*R^2*Pi*(diff(gamma(t), t, t))*h^3*rho-(1/6)*R^2*Pi*(diff(alpha(t), t))*Omega*h^3*rho-(1/12)*R^2*Pi*gamma(t)*Omega^2*h^3*rho = 0});

The objective is to reform it into matrix form : M*diff(X(t), t, t)+C*diff(X(t), t)+K*X(t)=F.

Thank you in advance for taking a look. 

Hi, anyone know the command to convert a digit to 8 bits binary number ?

Thanks for help..

Leading on from this post I made before:

http://www.mapleprimes.com/questions/210359-Integrating-Very-Large-Sums

I have a script that can now integrate larger sums thanks to the tips I was given. I now have a question regarding cpu usage when the calculation is run through a loop. I have attached two files. One contains the sum (large_sum.txt) which is then read in to the main Maple script (large_sum_int.mw).

When the loop is run, the first few points are calculated quite consistently with very similar cpu times. However, as the calculation progresses the cpu time suddenly increases (with larger sums than the one given it is a very severe increase) it then decreases again and returns to the time it took for the initial points to be calculated.

Is there a reason there is a sticking point in this calculation? is there a more efficient way to simplify it before it reaches the integration stage? When using simplify(...,size) the initial block takes a very long time to execute hence is not included here. This is not the largest sum that needs to be processed so I am looking for means to speed up calculation time/make it more consistent.

Any help is appreciated

large_sum.txt

large_sum_int.mw

-Yeti

I would like to extrapolate some values from a table:

What I have now is something like this: 

table [
(1,100)=1,
(1,200)=12,
(2,300)=33,
(3,100)=1,
(1,300)=43,
(3,200)=52,
(2,100)=31,
(2,200)=22,
(3,300)=3,
(4,...)=...]

I would like to have a table with the same value in the first position with changing the second value, for example:

table[
(2,100)=31,
(2,200)=22,
(2,300)=33,
(2,...)=..]


How can I do it?

Hi

 

I am new to Maple and discovering its features. I was wondering whether it is possible to define a function abstractly, say:

fo:=f(1/x)

and differentiate it, to obtain f'(1/x) (-1/x^2)? Is this possible?

 

Thanks!

Howdy all,

I am trying to fit an exponential and logistical model to a set of population data i've been given using the NonlinearFit function in the statistics toolbox. When try to find the fit for the exponential function I get an error saying "SVD of estimated Jacobian could not be computed". Furthermore, when I display the regression over the set of data points all it shows is a horizontal line. I'm not sure how to go about fixing this. My data set is only 17 points and my input function is about as simple as it gets.

When I run the program to solve for logisitcal model I do not get the error but the displayed plot still shows just a horizontal line dispite the function being non-linear.

So far I have...

regE := NonlinearFit(a*exp(b*x),year,population,x)

regLog := NonlinearFit(a/(1+b*exp(-c*x)),year,population,x)

expon := plot((regE), x = 1850..2020):

logi := plot((regLog), x = 1850..2020):

display({data,logi,expon});

I have not tried using optimization yet but I will soon although I'm not sure if it will improve my results since my undertanding is that they both use the same process to estimate the parameters.

Anyways, Thanks for the help in advance!!

 

EDIT: Here is the data I am using.

year := [1850,1860,1870,1880,1890,1900,1910,1920,1930,1940,1950,1960,1970,1980,1990,2000,2010]:

population :=[4668,9070,17375,27985,37249,63786,115693,186667,359328,528961,806701,1243158,1741912,2049527,2818199,3400578,4092459]:

 

 

I have a problem using variables values that were read form Maple library file (*.mla) with units.

For example:

In the first file called "calculations.mw" I calculate a variable with units and save value to "lib1.mla" file

 

A__1 := Units:-Standard:-`*`(2, Unit('m'))

2*Units:-Unit('m')

(1)

A1 := Units:-Standard:-Unit('m')

Units:-Unit('m')

(2)

savelib('A__1', 'A1', cat(interface(worksheetdir), "\\lib1.mla"))

``

 

 

Download calculations.mw

 

 

In the second file called "document.mw" I can read the value of a variable, but can't use it in expressions:

 

libname := cat(interface(worksheetdir))

"D:\TEMP\MTest"

(1)

A__1

2*Units:-Unit('m')

(2)

A__1

2*Units:-Unit('m')

(3)

2*A__1

Error, (in Units:-Standard:-*) invalid subscript selector

 

A1

Units:-Unit('m')

(4)

A1

Units:-Unit('m')

(5)

2*A1

Error, (in Units:-Standard:-*) invalid subscript selector

 

NULL

 

Download document.mw

 

Where I made a mistake? 

Hello, 

I look for a maple function / or a piece of code which enable to do repeated substitutions. In other words, repeat substitutions until there is no more possible substitution.

How can I do to make repeated substitutions ?

Here a example I would like to solve with maple

Equation on which I would like to conduct variables changements: 

Code:
eq := sin(psi[1](t)+gamma0(t))*cf+sin(gamma0(t)+theta[1](t)+psi[1](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[1](t) = sin(psi[2](t)+gamma0(t))*cf+sin(gamma0(t)+theta[2](t)+psi[2](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[2](t)


Definition of variables changement :

Code:
ChgtVariables:=psi[1](t)=Psi[1](t) - theta[1](t) + gamma[1](t),psi[2](t)=Psi[2](t) - theta[2](t) + gamma[2](t);psi[3](t)=Psi[3](t) - theta[3](t) + gamma[3](t),psi[4](t)=Psi[4](t) - theta[4](t) + gamma[4](t),theta[1](t)=Theta[1](t)+gamma[1](t),theta[2](t)=Theta[2](t)+gamma[2](t),theta[3](t)=Theta[3](t)+gamma[3](t),theta[4](t)=Theta[4](t)+gamma[4](t);


Application of subs function:

Code:
subs(ChgtVariables,eq);

The problem is that only one step of substitutions is conducted.

Here the expected result :

(sin(theta[1](t))-theta[2](t))*cf - (sin(gamma[1](t)-sin(gamma[2](t)))*mf  + xp[2](t) - xp[1](t) = 0

Thanks a lot for your hemp

sorry, i`m learning of thermaldynamics and want to make a graph of that x-axis  is number of spin-up and y-aixs is number of configuraions when there are atoms could only have spin-up and down.

 

if the atoms are 10, what is the formular in maple 17

how about 100 ?

 

please let me know, thank you

I have 101 point with very low value

and I'm trying to get the best curve that fits that points. I have tryed with a polynomial interpolator but the curve is not very good. I have also tried with an exponential but an error ocurrs. 

Error, (in Statistics:-ExponentialFit) dependent values must evaluate to positive numbers

 

Can anyone help me? Any ideas? How can I find the best curve fitting?

 

Thanks.

Hello,

I try to simplify a system of 6 trigonometric equations and then to extract the 3 first equations.

When I conduct my calculations, It seems that that I have some troubles with some index.

There is a term with "table" which is not evaluated.

Do you have ideas why the last equations in my code have a table inside and consequently can not be evaluated?

I attached my code

example.mw

Thank you for your help.

 

 

Hi all

 

How can I make maple to write the values of each contour plot on the graph?

I have a 3d graph and want to have a contour plot in which each line have the associated value on it. I know I can use legends and input the values for each line by hand but I dont know those values. I just need maple to calculate the values and write them on the contour plot. 

 

Many thanks for helping me 

First 1146 1147 1148 1149 1150 1151 1152 Last Page 1148 of 2428