semi-automatic curve sketching in SMath

semi-automatic curve sketching in SMath - 消息

#1 已发布: 2020/2/19 12:59:27
Dux

Dux

0个赞,共4个帖子。

组: User

Factorio Productivity Modules and Speed Beacons.sm (8.77 KiB)已下载 1171 次。
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 已发布: 2020/2/20 08:40:58
Dux

Dux

0个赞,共4个帖子。

组: 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 已发布: 2020/2/20 12:23:24
Arie

Arie

94个赞,共285个帖子。

组: 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.

未找到文件。未找到文件。
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 已发布: 2020/2/20 14:17:23
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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 已发布: 2020/3/3 18:56:01
Dux

Dux

0个赞,共4个帖子。

组: 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.02 KiB)已下载 1208 次。

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

Or calculating an angle in a right-angled triangle:Angle.sm (2.4 KiB)已下载 1131 次。
Can't solve that too! Also Maxima needed?
#6 已发布: 2020/3/3 19:38:42
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

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

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

Pythagoras.sm (9.83 KiB)已下载 1192 次。
#7 已发布: 2020/3/3 21:50:28
Dux

Dux

0个赞,共4个帖子。

组: 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.83 KiB)已下载 1192 次。


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 已发布: 2020/3/4 01:03:49
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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.26 KiB)已下载 1162 次。
#9 已发布: 2020/3/4 01:58:10
CBG

CBG

78个赞,共312个帖子。

组: User

Exemplos simples

Pythagoras_R1.sm (21.04 KiB)已下载 1212 次。

Best Regards

Carlos
#10 已发布: 2020/3/4 11:01:22
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

That's not what I had in mind.


You can have Pythagora otherwise.

Circle Pythagora.sm (5.76 KiB)已下载 1150 次。

Pythagora.PNG
#11 已发布: 2020/3/4 11:19:08
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

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

Maths Polygon Edu.sm (47.22 KiB)已下载 1196 次。
Maths Polygon Area_Perimeter.sm (55.37 KiB)已下载 1182 次。
Maths Polygon.sm (860.25 KiB)已下载 1190 次。
#12 已发布: 2020/3/4 12:08:49
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

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

Maths Pythagora.sm (16.29 KiB)已下载 1208 次。
#13 已发布: 2020/3/4 17:39:10
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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.02 KiB)已下载 1208 次。

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

Or calculating an angle in a right-angled triangle:Angle.sm (2.4 KiB)已下载 1131 次。
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.22 KiB)已下载 1212 次。
Pythagoras_Kr.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
  • 有新帖
  • 无新帖