Hidden variabile in functions contaning integrals - Сообщения
I would like to solve a system of two equations in two variables (x, y) which contain defined integrals with other two variables (t, z for example).
The functions seem to work properly, but why does Smath also recognize as unknowns the fictitious variables into the integrals?
I can't solve the system....
Thanks.
Prova funzione.sm (9 КиБ) скачан 60 раз(а).
WroteI can't solve the system....
As simple as demonstrated !
Prova funzione.sm (6 КиБ) скачан 50 раз(а).
Forum example.sm (48 КиБ) скачан 53 раз(а).
As you can see, I know the solution of the system from a textbook example made with Mathcad: the single variable equation works well (apart the fact I've to input a very short range of solution...), but for the system of two eqn there is an errorro referring to a matrix...
Can anyone help me?
Thanks in advance.
PS: I know Jean doesn't like the unit usage, but it's very useful for making more general spreadsheets!
WroteJust for my curiosity, are you obliged by your codes (and which) to use the parabola-rectangle diagram?
Italian code NTC2018 probably, it allows to use different diagrams.
WroteHope this solves your problem: (declare the boundaries). Just for my curiosity, are you obliged by your codes (and which) to use the parabola-rectangle diagram?
Regards,
Alvaro
No, I'm not obliged to use the parabola-rectangle diagramma for the ULS.
WroteYour system is over-killed from gyzmas [subscripts] and from carrying units at the design stage. You have J, N in the solve bloc. Smath is not a clone of the crappy PTC Mathcad.
Thanks. I can remote units before defining the functions, but what are the subscript-related issues?
WroteThank you Davide, now I have dowloaded/read the NTC2018, it looks like EC2-1.1.
Yes, the Italian code is very similar to Eurocodes, also for the design of structures made with material other than concrete.
Now I have three different errors:
- Maxima couldn't reduce functions to polynomials;
- roots founds 2 equations with 3 variables;
- FindRoots I do not understand.
I think now I'm closer to the solution. Any other suggest?
PS: sometimes I used a while loop to solve single equations, but I've some desing difficulties with 2 variables...
WroteOld school. See AlgLib 3.1x.
Many thanks Viacheslav, your NL solver found the solution in few seconds! Forum example w-o units_2.sm (48 КиБ) скачан 41 раз(а).
Now I'll test it in a more complex engineering problem

WroteI purged units in function definitions: Forum example w-o units.sm (54 КиБ) скачан 45 раз(а).
Now I have three different errors:
- Maxima couldn't reduce functions to polynomials;
- roots founds 2 equations with 3 variables;
- FindRoots I do not understand.
I think now I'm closer to the solution. Any other suggest?
PS: sometimes I used a while loop to solve single equations, but I've some desing difficulties with 2 variables...
I think maxima Solve() can't handle functions containing conditional statements. Using boolean expressions won't help, as these aren't translated to maxima.
Wrote...
I think maxima Solve() can't handle functions containing conditional statements. Using boolean expressions won't help, as these aren't translated to maxima.
Hi Martint. I guess that what you have in Maxima for handle conditionals is unit_step(x) = ( 0 if x <= 0 and 1 for x > 0 ).
Or can use U(x) = (1 + signum(x))/2 which takes U(0)=1/2.
I don't try to use it, but guess that both can be used for Solve, Integrate and Diff inside SMath calling Maxima.
Best regards.
Alvaro.
WroteWrote...
I think maxima Solve() can't handle functions containing conditional statements. Using boolean expressions won't help, as these aren't translated to maxima.
Hi Martint. I guess that what you have in Maxima for handle conditionals is unit_step(x) = ( 0 if x <= 0 and 1 for x > 0 ).
Or can use U(x) = (1 + signum(x))/2 which takes U(0)=1/2.
I don't try to use it, but guess that both can be used for Solve, Integrate and Diff inside SMath calling Maxima.
Best regards.
Alvaro.
Hi Alvaro, thanks for the unit_step() hint. Generally, charfun() is a more general approach to convert boolean expressions to 0 and 1. However, symbolic integration in maxima can't handle charfun(), whereas the unit_step() function is handled. See feature request SS-99.
.
Some testing shows that Solve() (maxima's solve()) doesn't handle step functions well. Perhaps there are some options or special packages to improve this, but it doesn't work out of the box. Handling of integrals with abs() and sign() is enabled by loading the package abs_integrate, which is done by default in the plugin, see the session log in the printout.
Here is an overview of integration of piecewise continuous functions (from the interactive handbook). Some of these are handled symbolically by maxima, some of them are returned unchanged and then handled by poor man's non-adaptive SMath numeric integrator.
For now, the sign() and abs() approaches work.
Section math piecewise.sm (30 КиБ) скачан 49 раз(а).
WroteWroteOld school. See AlgLib 3.1x.
Many thanks Viacheslav, your NL solver found the solution in few seconds! Forum example w-o units_2.sm (48 КиБ) скачан 41 раз(а).
Now I'll test it in a more complex engineering problem
Forum example w-o units_3.sm (52 КиБ) скачан 28 раз(а).
Here a test with 3 equations: someting went wrong, because the solution is expected to be near the origin and function value in the origin is very large... I can't find a graphical solution in this case...
EDIT: Following AlgLib example, I'm not able to compute the Jacobian matrix. It seems the issues is due to inequalities in the integrand definition...
WroteWroteHere a test with 3 equations: someting went wrong, because the solution is expected to be near the origin and function value in the origin is very large... I can't find a graphical solution in this case...
Your project is not visible:
1. NO units whatsoever, nowhere.
2. Visible values
3. NO subscript
As it looks, you seem seeking for the intersection of 2 double integral.
You may proceed like in real Engineering project, i.e:
1. Tabulate each double integral in matrix.
2. Unwrap each matrix in single vector, adjoin fake index.
3. Plot 2D to see intersection.
4. Interpolate, solve for more exact graphical solution.
Wrote... subjective of visibility.
Integrate Compendium_17 DOUBLE Fourier CoC.sm (55 КиБ) скачан 39 раз(а).
I do not well understand your suggestions... There are 3 double integrals with a functions of 3 variables.
However I compared the results of the previous design with those from a simple domain discretization (using the known solution), in a way to detect some input errors: no errors but the solver still does not work.
Forum discretization example.sm (123 КиБ) скачан 45 раз(а).
Forum example w-o units_4.sm (79 КиБ) скачан 36 раз(а)..
https://en.smath.com/forum/yaf_postst1775p2_AlgLib-3-1x.aspx : I see the solver deals also with 3 variables...
Any other suggested solver?

- I'd improve the solution speed;
- I still can't evaluate the Jacobian matrix.
I think the use of Jacobian would improve the efficiency (https://www.mathworks.com/help/optim/ug/nonlinear-least-squares-with-full-jacobian.html)
Also the use of some eval()...
Forum example w-o units_4-BIS.sm (83 КиБ) скачан 39 раз(а).
Any suggestions?
Could you please tell me what are the equations you want to solve (as I sincerely don't know about the Jacobian procedure and the AlgLib solver).
Nint = ?;
Mxint = ?;
Myint = ?;
I will give it a try, I understand that you are dealing with biaxial bending of a concrete column.. as I am working on my interaction volume these weeks, I think I could help you.
By the way, I am proceeding with the shoelace Gauss formula to obtain the compression volume of concrete (a discrete approach, not a continuous double-integral approach) and also with the R diagram for concrete (not P-R).
But I will try to find a solution for your equations (staying continuous).
Regards,
Alvaro
WroteI purged units in function definitions:
#20 Опубликовано: 27.05.2020 17:35:19Wrotegood news
, the AlgLib solver works, but:
- I'd improve the solution speed;
- I still can't evaluate the Jacobian matrix.
I think the use of Jacobian would improve the efficiency (https://www.mathworks.com/help/optim/ug/nonlinear-least-squares-with-full-jacobian.html)
Also the use of some eval()...
Forum example w-o units_4-BIS.sm (83 КиБ) скачан 39 раз(а).
Any suggestions?
Forum example w-o units_4-BIS.sm (80 КиБ) скачан 44 раз(а).
It seems that the issue was due to the Jacob() function: I defined manually the Jacobian matrix, but Smath still do not show me the result...Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
-
Новые сообщения
-
Нет новых сообщений