<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HOW TO SOLVE IMPLIED EQUATIONS IN QT ?]]></title><description><![CDATA[<p dir="auto">Hello everyone, can you help me with how to solve implicit equations in qt; In the code I'm working on I need to solve several implicit equations, I also need to know if qt has tools to solve this type of equations.</p>
<p dir="auto">Attached image of an implicit equation, I need to solve f based on the rest of the parameters<br />
<img src="https://ddgobkiprc33d.cloudfront.net/402f369a-c14f-4b41-863e-d3e507e59868.JPG" alt="ecuacion.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/136666/how-to-solve-implied-equations-in-qt</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Jul 2026 02:01:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/136666.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 May 2022 13:51:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HOW TO SOLVE IMPLIED EQUATIONS IN QT ? on Fri, 20 May 2022 19:36:37 GMT]]></title><description><![CDATA[<p dir="auto">If it's not possible to solve analytically (i.e. pen and paper or wolfram) you need a root finding algorithm. Qt does not deal with this stuff but <a href="https://www.boost.org/" target="_blank" rel="noopener noreferrer nofollow ugc">boost</a> (the most popular C++ library after std) does:</p>
<pre><code class="language-cpp">#include &lt;boost/math/tools/roots.hpp&gt;
double solve_for_F(double var_epsilon_D, double var_Re, double starting_guess=0.5)
    using namespace boost::math;
    tools::eps_tolerance&lt;double&gt; tol(std::numeric_limits&lt;double&gt;::digits / 2);
    const int maximumIterations = 1000;
    boost::uintmax_t maxIter(maximumIterations); //maximum number of attempts
    try{
        const std::pair&lt;double, double&gt; Result = tools::bracket_and_solve_root(
            [var_epsilon_D,var_Re](double var_f) -&gt; double {
                return (1.0/sqrt(f))+2.0*log10((var_epsilon_D/3.7)+(2.5/(var_Re*sqrt(f))));
            }
            , starting_guess, 2.0, false, tol, maxIter, optim_policy());
        if (maxIter &gt;= maximumIterations)
            return 0.0; //failed to find
        return (Result.first + Result.second) / 2.0;
    }
    catch (evaluation_error) {
        return 0.0; // Evaluation Error
    }
    catch (std::underflow_error) {
        return 0.0; // Underflow Error
    }
    catch (std::underflow_error) {
        return 0.0; // Overflow Error
    }
    catch (std::domain_error) {
        return 0.0; // Domain Error
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/714955</link><guid isPermaLink="true">https://forum.qt.io/post/714955</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Fri, 20 May 2022 19:36:37 GMT</pubDate></item><item><title><![CDATA[Reply to HOW TO SOLVE IMPLIED EQUATIONS IN QT ? on Fri, 20 May 2022 14:44:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alex_1">@<bdi>ALEX_1</bdi></a> said in <a href="/post/714918">HOW TO SOLVE IMPLIED EQUATIONS IN QT C++?</a>:</p>
<blockquote>
<p dir="auto">in qt c++</p>
</blockquote>
<p dir="auto">Qt is a toolkit/function library.  It is not a language, and there is no such thing as "Qt C++".<br />
Your question seems to be a pure C++ one.  Qt does not address this area.</p>
]]></description><link>https://forum.qt.io/post/714929</link><guid isPermaLink="true">https://forum.qt.io/post/714929</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 20 May 2022 14:44:05 GMT</pubDate></item></channel></rss>