semi-automatic curve sketching in SMath

semi-automatic curve sketching in SMath - Сообщения

#1 Опубликовано: 19.02.2020 12:59:27
Dux

Dux

0 сообщений из 4 понравились пользователям.

Группа: User

Factorio Productivity Modules and Speed Beacons.sm (8 КиБ) скачан 45 раз(а).
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 Опубликовано: 20.02.2020 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 Опубликовано: 20.02.2020 12:23:24
Arie

Arie

93 сообщений из 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 Опубликовано: 20.02.2020 14:17:23
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 Опубликовано: 03.03.2020 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 КиБ) скачан 35 раз(а).

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

Or calculating an angle in a right-angled triangle:Angle.sm (2 КиБ) скачан 31 раз(а).
Can't solve that too! Also Maxima needed?
#6 Опубликовано: 03.03.2020 19:38:42
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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

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

Pythagoras.sm (9 КиБ) скачан 32 раз(а).
#7 Опубликовано: 03.03.2020 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 КиБ) скачан 32 раз(а).


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 Опубликовано: 04.03.2020 01:03:49
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 35 раз(а).
#9 Опубликовано: 04.03.2020 01:58:10
CBG

CBG

77 сообщений из 312 понравились пользователям.

Группа: User

Exemplos simples

Pythagoras_R1.sm (21 КиБ) скачан 41 раз(а).

Best Regards

Carlos
#10 Опубликовано: 04.03.2020 11:01:22
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

That's not what I had in mind.


You can have Pythagora otherwise.

Circle Pythagora.sm (5 КиБ) скачан 27 раз(а).

Pythagora.PNG
#11 Опубликовано: 04.03.2020 11:19:08
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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

Maths Polygon Edu.sm (47 КиБ) скачан 35 раз(а).
Maths Polygon Area_Perimeter.sm (55 КиБ) скачан 34 раз(а).
Maths Polygon.sm (860 КиБ) скачан 31 раз(а).
#12 Опубликовано: 04.03.2020 12:08:49
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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

Maths Pythagora.sm (16 КиБ) скачан 30 раз(а).
#13 Опубликовано: 04.03.2020 17:39:10
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 КиБ) скачан 35 раз(а).

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

Or calculating an angle in a right-angled triangle:Angle.sm (2 КиБ) скачан 31 раз(а).
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 КиБ) скачан 29 раз(а).
Pythagoras_Kr.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений