semi-automatic curve sketching in SMath

semi-automatic curve sketching in SMath - Messages

#1 Posted: 2/19/2020 12:59:27 PM
Dux

Dux

0 likes in 4 posts.

Group: User

Factorio Productivity Modules and Speed Beacons.sm (8 KiB) downloaded 45 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?
#2 Posted: 2/20/2020 8:40:58 AM
Dux

Dux

0 likes in 4 posts.

Group: User

I tried to calculate the optimal ratio for assembly machines with productivity modules and beacons with speed modules in Factorio. https://factoriocheatsheet.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?
#3 Posted: 2/20/2020 12:23:24 PM
Arie

Arie

93 likes in 285 posts.

Group: User

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.

File not found.File not found.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 Posted: 2/20/2020 2:17:23 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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

#5 Posted: 3/3/2020 6:56:01 PM
Dux

Dux

0 likes in 4 posts.

Group: User

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 (6 KiB) downloaded 35 time(s).

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

Or calculating an angle in a right-angled triangle:Angle.sm (2 KiB) downloaded 31 time(s).
Can't solve that too! Also Maxima needed?
#6 Posted: 3/3/2020 7:38:42 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Maxima 160 MB ... Oh !!! ... Mathcad 11.2a is 20 MB

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

Pythagoras.sm (9 KiB) downloaded 32 time(s).
#7 Posted: 3/3/2020 9:50:28 PM
Dux

Dux

0 likes in 4 posts.

Group: User

Wrote

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


WHAT? I have no idea what that means.

Wrote

Maxima 160 MB ... Oh !!! ... Mathcad 11.2a is 20 MB


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

Wrote

Pythagoras.sm (9 KiB) downloaded 32 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*b)^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.
#8 Posted: 3/4/2020 1:03:49 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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 (20 KiB) downloaded 35 time(s).
#9 Posted: 3/4/2020 1:58:10 AM
CBG

CBG

77 likes in 312 posts.

Group: User

Exemplos simples

Pythagoras_R1.sm (21 KiB) downloaded 41 time(s).

Best Regards

Carlos
#10 Posted: 3/4/2020 11:01:22 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

That's not what I had in mind.


You can have Pythagora otherwise.

Circle Pythagora.sm (5 KiB) downloaded 27 time(s).

Pythagora.PNG
#11 Posted: 3/4/2020 11:19:08 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... more maths for your Pythagora [Area, Perimeter].

Maths Polygon Edu.sm (47 KiB) downloaded 35 time(s).
Maths Polygon Area_Perimeter.sm (55 KiB) downloaded 34 time(s).
Maths Polygon.sm (860 KiB) downloaded 31 time(s).
#12 Posted: 3/4/2020 12:08:49 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

ATOMATIC rather than semi-automatic sketching.
Solving all Pythagora ...

Maths Pythagora.sm (16 KiB) downloaded 30 time(s).
#13 Posted: 3/4/2020 5:39:10 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

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 (6 KiB) downloaded 35 time(s).

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

Or calculating an angle in a right-angled triangle:Angle.sm (2 KiB) downloaded 31 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 (11 KiB) downloaded 29 time(s).
Pythagoras_Kr.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts