## 884 Reputation

16 years, 95 days

## Figured it out...

@brian bovril with vv's help....

Turns out it wasnt a version issue. It took exception to something in my maple.ini file. Specifically it didn't like the declaration e:=exp(1);

## Indeed......

@vv When I removed my maple.ini file, your code worked!

it doesnt like my declaration  e:=exp(1);

interface(prompt=""):
e:=exp(1);
Digits:=15;

## Ummm.......

@vv I get errors when i run this code. M2018.0

## Still not working for me...

@Carl Love Maple 2018.0

## Currency...

@acer Thanks. And Carl. I'm now trying to multiply the kWh/d by \$0.27265/kWh to get 4.67 USD/d.

this didn't work 4.9*Unit(kW)*3.5*Unit(h/day)*0.27265*Unit(USD/kWh)

but this did....

Units[UseSystem]( NewSI );
combine( 4.9*Unit(kW)*3.5*Unit(h/day)*0.27265*Unit(USD/kWh), units );

## Yes, I wanted a closed form solution......

I would be interested to see your derivation of the formula.

Given

A= the number of rats born in a liter
G= the "gestation" period that a newborn rat must wait before giving birth
I= the interval between births

If I supply G and I, i can get the series in terms of A,

[NB the initial pair of rats produce A offspring immediatly].

restart:local I:
G:=120;I:=40;
sol3:=rsolve({U(n)=U(n-G/I+2)+A/2*U(n-G/I), U(0) = 2+A, U(1) = 2+2*A, U(2) = 2+3*A}, {U}, 'makeproc'):
seq( sol3(j), j=0..5);

What I really wanted was a closed form solution of the populations as a function of day given the symbolic parameters A,G,I

## I was kind of hoping for a general expre...

I tried this

a:=unapply(rsolve({{U(n)=U(n-1)+3*U(n-3), U(0) = 6, U(1) = 6, U(2) = 6, U(3)=24}}, U(n)), n);  # General formula
seq(expand(a(n)), n=0..9);  # The first 10 terms

didnt work. Then I tried

restart;
sol1:=rsolve({U(n)=U(n-1)+3*U(n-3), U(0) = 6, U(1) = 6, U(2) = 6}, {U}, 'makeproc'):
L:=[seq( sol1(j), j=0..9)];
g:= gfun[guessgf](L,n, [ogf]);
convert(g[1],FPS,n);

but, no cigar

## Incidentally...

@Joe Riel I found this in my Maple 7 folder. I suspect it was written by you.

alphametics.mws

## I dunno...

1. I don't know where this is. I'm running M2017. I did right click in the help page "copy examples".

2. I don't think i am. I seem to remember it was a bugger to setup.

## location...

@Joe Riel on my machine

LibraryTools:-FindLibrary(Iterator);

"C:\Program Files\Maple 2017\lib\maple.mla"

## when i try to run the code...

@vv i get error

alphametic("maple*sim = modelica + model")
Error, (in Iterator:-Permute) invalid input: too many and/or wrong type of arguments passed to Permute:-ModuleCopy; first unused argument is accept = pred

## I picture is worth a thousand words......

@Kitonum Thanks Yuri

## Visualisation...

@Kitonum I am having trouble visualising what the OP is describing.

Is it possible to produce a 3d plot or animation of the slicing and the shape of the objects produced as a function of R and the planes [x=+/-R,y=+/-R,z=+/-R]

 3 4 5 6 7 8 9 Last Page 5 of 25
﻿