Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Dux  
#1 Posted : 19 February 2020 18:59:27(UTC)
Dux

Rank: Newbie

Groups: Registered
Joined: 19/02/2020(UTC)
Posts: 4

Factorio Productivity Modules and Speed Beacons.sm (9kb) downloaded 23 time(s).
I made a curve sketching with the equations on paper. Now I hoped to do it in SMath too, to make it easier an prettier. But I'm having problems all a round.

Write both functions: worked.

Insert one into the other to obtain two functions with only one var: worked manually.

Build the diff of both functions: worked, but the result is very complicated.
My results:
f'(c)=1-3a/c^2
f'(r)=3-a/r^3

Set the diffs=0 and obtain the extrema (positive only): no clue.
My results:
c=sqrt(3a)
r=sqrt(a/3)

Check them with the second derivative, if they are truly a minimum point: last results already missing.
My results:
Both are minima.

Get the relation of c/r...
My results:
c/r=3/1

But how do I get all of that at least semi-automatically in SMath?

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Dux  
#2 Posted : 20 February 2020 14:40:58(UTC)
Dux

Rank: Newbie

Groups: Registered
Joined: 19/02/2020(UTC)
Posts: 4

I tried to calculate the optimal ratio for assembly machines with productivity modules and beacons with speed modules in Factorio. https://factoriocheatshe...com/#modules-and-beacons
In general you build lines of assembly machines with lines of the beacons on the outside https://i.imgur.com/IXTAT94.png

Then the question was: Do I increase the line length (columns) or do I start a new line (more rows)?! Or more mathematical: what is the optimal ratio between rows and columns that needs the least amount of beacons?
Offline alyles  
#3 Posted : 20 February 2020 18:23:24(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 276
United States

Was thanked: 91 time(s) in 57 post(s)
Here's something I put together. You'll need the Maxima plugin to run it. SMaths built in symbolic engine is lacking and therefore it's generally better to use Maxima or maple plugins when solving symbolically.

Factorio_Productivity_Modules_and_Speed_Beacons_alyles.sm (25kb) downloaded 23 time(s). Factoria_Productivity_Modules_and_Speed_Beacons_alyles.pdf (328kb) downloaded 18 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#4 Posted : 20 February 2020 20:17:23(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Dux Go to Quoted Post
Then the question was: Do I increase the line length (columns) or do I start a new line (more rows)?! Or more mathematical: what is the optimal ratio between rows and columns that needs the least amount of beacons?

No answer without analyzing the source suggestion.
From what you were attempting your representation ... generalize.

Factorio.PNG

Offline Dux  
#5 Posted : 04 March 2020 00:56:01(UTC)
Dux

Rank: Newbie

Groups: Registered
Joined: 19/02/2020(UTC)
Posts: 4

Let's try something simple. Solve a triangle side length with Pythagoras. I want to know how long the longest side p is. The other sides are h and 1,5b long. So the formula goes p^2=... How do I get SMath to solve it for p, do I already need Maxima for that?
Pythagoras.sm (7kb) downloaded 14 time(s).

The maxima plugin is 160mb, when SMath is less than 3mb?!

Or calculating an angle in a right-angled triangle: Angle.sm (3kb) downloaded 12 time(s).
Can't solve that too! Also Maxima needed?

Edited by user 04 March 2020 01:17:14(UTC)  | Reason: Not specified

Offline Jean Giraud  
#6 Posted : 04 March 2020 01:38:42(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Maxima 160 MB ... Oh !!! ... Mathcad 11.2a is 20 MB

No red SS 6179 ... if red SS 7030: please report.

Pythagoras.sm (10kb) downloaded 15 time(s).
Offline Dux  
#7 Posted : 04 March 2020 03:50:28(UTC)
Dux

Rank: Newbie

Groups: Registered
Joined: 19/02/2020(UTC)
Posts: 4

Originally Posted by: Jean Giraud Go to Quoted Post
No red SS 6179 ... if red SS 7030: please report.

WHAT? I have no idea what that means.

Originally Posted by: Jean Giraud Go to Quoted Post
Maxima 160 MB ... Oh !!! ... Mathcad 11.2a is 20 MB

The old versions are free? So use them instead of SMath?

Originally Posted by: Jean Giraud Go to Quoted Post
Pythagoras.sm (10kb) downloaded 15 time(s).

That's not what I had in mind. Why do you clear h and b? Those were given for a reason (easy example). I just wanted to know a way, where SMath inserts the values from h and b in the "p^2=..."-formula and solves it for p (the greyed out block is the expected result, when I type "p=" below h=3 b=5 and p^2=..., but all the different equal sign and evaluate symbolically aren't working as I'd like them to).

https://web2.0calc.com/ is nearly enough (for now?) math wise: integrals, diff, solving functions...
I can go there paste "h=3 b=5 p^2=h^2+(1.5*Cool^2" and it's solved (p=...) I just want a more permanent way, like the SMath or excel save files.
But in SMath no idea, even your example didn't help sadly.
You already transformed the formula to sqrt() yourself. Why did you clear the h and b? The section with sinus and alpha also doesn't calculate itself.

I specify sin(alpha)=... and I hope when I type "alpha=", it does what you did automatically, it will evaluate the last formula, realize D isn't needed anyway, reduce the fraction and calculate the asin(1/2) to get alpha. The webcalc fails with "sin(a)=(3/2D)/3D" too, but "sin(a)=(3/2)/3" works at least.
Offline Jean Giraud  
#8 Posted : 04 March 2020 07:03:49(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Dux Go to Quoted Post
Why do you clear h and b?

explained in the project "Clear if you have used"
The attached solves generally/literal
then you just need to plug specifics.
Given sin(x) ... x is asin(x) built-in Smath from f(x) menu.
Nothing to invent ... further asin(x) is built-in Win.

Pythagoras_Revisit.sm (21kb) downloaded 16 time(s).
Offline CBG  
#9 Posted : 04 March 2020 07:58:10(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Exemplos simples

Pythagoras_R1.sm (22kb) downloaded 21 time(s).

Best Regards

Carlos
Offline Jean Giraud  
#10 Posted : 04 March 2020 17:01:22(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Dux Go to Quoted Post
That's not what I had in mind.

You can have Pythagora otherwise.

Circle Pythagora.sm (6kb) downloaded 11 time(s).

Pythagora.PNG
Offline Jean Giraud  
#11 Posted : 04 March 2020 17:19:08(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... more maths for your Pythagora [Area, Perimeter].

Maths Polygon Edu.sm (48kb) downloaded 13 time(s).
Maths Polygon Area_Perimeter.sm (56kb) downloaded 11 time(s).
Maths Polygon.sm (861kb) downloaded 13 time(s).
Offline Jean Giraud  
#12 Posted : 04 March 2020 18:08:49(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
ATOMATIC rather than semi-automatic sketching.
Solving all Pythagora ...

Maths Pythagora.sm (17kb) downloaded 16 time(s).
Offline mkraska  
#13 Posted : 04 March 2020 23:39:10(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: Dux Go to Quoted Post
Let's try something simple. Solve a triangle side length with Pythagoras. I want to know how long the longest side p is. The other sides are h and 1,5b long. So the formula goes p^2=... How do I get SMath to solve it for p, do I already need Maxima for that?
Pythagoras.sm (7kb) downloaded 14 time(s).

The maxima plugin is 160mb, when SMath is less than 3mb?!

Or calculating an angle in a right-angled triangle: Angle.sm (3kb) downloaded 12 time(s).
Can't solve that too! Also Maxima needed?


The Maxima plugin is 1.4mb and requires a standard installation of Maxima, which is another 660mb. Ideally, we would have an integrated maxima stripped down to the bare functionality, without front end, doc, source, packages. Yet, the maxima guys are very picky about license issues, therefore I don't distribute Maxima any more bundled with SMath.

If you don't care about legal issues, you can use the maple plugin, it uses a maple executable of just some mb without authorization.

Recently, there have been efforts to enhance the symbolic capabilities with native SMath tools, including some sort of solve function.

Perhaps symbolic solvers are overkill for your problem anyways, as the FindRoot() function from the Nonlinear solvers plugin can handle the example as well.

Pythagoras_Kr.sm (12kb) downloaded 14 time(s).
Pythagoras_Kr.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.