<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ode with unknown initial conditions in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153198#M60252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I think I am close to the right solution. Is the minimize-function used correctly? The program tells me it needs a scalar or a matrix for F2. As it can be seen in the figure, F2 is a scalar, but I also defined it as a matrix, both does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the right parameters manually by try and error (index cor) and the corresponding function &lt;STRONG&gt;sol, &lt;/STRONG&gt;that fulfills the boundary conditions. But finding them by the solve block does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but I am very new to Mathcad.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="beam-deflection.JPG" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/93482_beam-deflection.JPG" style="width: 620px; height: 713px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Oct 2015 08:49:46 GMT</pubDate>
    <dc:creator>sdidam</dc:creator>
    <dc:date>2015-10-22T08:49:46Z</dc:date>
    <item>
      <title>ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153192#M60246</link>
      <description>Hi everyone,I have a problem solving an ODE. I want to calculate the deflection of a beam, but at the beginning I don't know the force and the force application Point. So I make a guess of it. With a good guess or with iterations (very much work) I can solve it. But because I</description>
      <pubDate>Thu, 03 May 2018 15:00:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153192#M60246</guid>
      <dc:creator>sdidam</dc:creator>
      <dc:date>2018-05-03T15:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153193#M60247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're using 3.1, so I can't open your sheet (stuck in 3.0.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solve beam deflection by solving the differential equation [EI d^2y/dx^2 = M(x)].&amp;nbsp; You can develop the equation for moment along the beam for whatever force arrangement you have.&amp;nbsp; Two additional constraints are required--if it's a cantilever these would be displacement and slope at the origin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 13:54:59 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153193#M60247</guid>
      <dc:creator>Fred_Kohlhepp</dc:creator>
      <dc:date>2015-10-21T13:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153194#M60248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's right, this point I already have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a cantilever beam, length &lt;STRONG&gt;l&lt;/STRONG&gt;, fixed at x=0 [boundary conditions: w(0)=0; w'(0)=0].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Problem is, that I don't know at the beginning of the calculation where the force application point &lt;STRONG&gt;a&lt;/STRONG&gt; is and also the Force &lt;STRONG&gt;F&lt;/STRONG&gt; is unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the equation for the Moment is:&lt;/P&gt;&lt;P&gt;M(x)=F*(a-x) from x=0 to x=a and&lt;/P&gt;&lt;P&gt;M(x)=0 from x=a to x=l &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I know the following:&lt;/P&gt;&lt;P&gt;w'(a)=0&lt;/P&gt;&lt;P&gt;w(a):= is a function of x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point is, that the Moment of inertia is not constant. In my example I simplified it to a linear relationship of x. In my more complicated case there are multible integrals in it, so that there is no easy solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can solve the Problem with iterations manually or with a good guess, but I want to do this automatically, because that costs a lot of time and I have many problems like this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 14:25:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153194#M60248</guid>
      <dc:creator>sdidam</dc:creator>
      <dc:date>2015-10-21T14:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153195#M60249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make I a function of x as well as moment. If I(x) requires integrals it will slow down computation; one way to speed that is to create a vector of I at points along the length and fit a polynomial (function "regress") to the curve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have problems with tension and compression along with lateral loading, so I need terms of M(x) + Faxial y(x) was well as variable I(x).&amp;nbsp; They all can solve.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/93431_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.ptc.com/legacyfs/online/93432_pastedImage_3.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 15:09:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153195#M60249</guid>
      <dc:creator>Fred_Kohlhepp</dc:creator>
      <dc:date>2015-10-21T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153196#M60250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like Fred I can't read your Prime 3.1 file, but perhaps this will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Turn odesolve into a function. Here's an example that was written in Mathcad 15:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-4" src="https://community.ptc.com/legacyfs/online/93459_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The syntax in Prime is a little different, but not much. Theta is now a function of the two parameters i and j (in your case, it would be a and F, your unknowns). Remember that odesolve returns a function, so theta(i,j) is a function that returns a function. We now need to convert this function to a simple function that returns values, rather than another function. This is such a function for a single value of i, j, and t:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="93454" alt="" class="jive-image image-2" src="https://community.ptc.com/legacyfs/online/93454_pastedImage_5.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;If you want to pass it a vector of values for t use this form of the function though:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="93455" alt="" class="jive-image image-3" src="https://community.ptc.com/legacyfs/online/93455_pastedImage_6.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;You don't want to use the first version for many values of t, because it will call the odesolve block for every value. The second version will call it only once. Now if I don't know what i and j are, but I can write two equations where everything other than i and j are known, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Theta(i,j,0)=0&lt;/P&gt;&lt;P&gt;Theta(i,j,1)=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use a solve block to find i and j (in other words, use a solve block to do the iterative process that you are doing by hand)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 18:10:42 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153196#M60250</guid>
      <dc:creator>RichardJ</dc:creator>
      <dc:date>2015-10-21T18:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153197#M60251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephan. First, rewrite M2 as M2(x,a,F2). a &amp;amp; F2 are unknowns, so M2(x) is useless for odesolve. Now you have 4 conditions, two as boundary or initial conditions for the odesolve, and other two for some solve block or minimize function. For a 2nd degree ode, don't use more than 2 border or IC. But, just because a and F2 are unknowns, write the odesolver as w2(a,F2) = odesolve(w2(x),l). This is what Richard and Fred tell you to do. Now, your ode solution w2 is a function of two parameters (variables, but with some degree of ... of&amp;nbsp; ... ok, variables at least. Actually parameters is an argot in math and technically doesn't exists). Now make a good guess for a and F2, and call minimize (or maybe a solve block) for w2(a,F2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 05:06:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153197#M60251</guid>
      <dc:creator>AlvaroDíaz</dc:creator>
      <dc:date>2015-10-22T05:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153198#M60252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I think I am close to the right solution. Is the minimize-function used correctly? The program tells me it needs a scalar or a matrix for F2. As it can be seen in the figure, F2 is a scalar, but I also defined it as a matrix, both does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the right parameters manually by try and error (index cor) and the corresponding function &lt;STRONG&gt;sol, &lt;/STRONG&gt;that fulfills the boundary conditions. But finding them by the solve block does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but I am very new to Mathcad.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="beam-deflection.JPG" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/93482_beam-deflection.JPG" style="width: 620px; height: 713px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 08:49:46 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153198#M60252</guid>
      <dc:creator>sdidam</dc:creator>
      <dc:date>2015-10-22T08:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153199#M60253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the future - don't forget to save your worksheet in PDF or XPS file formats for preview (and its contents).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 09:43:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153199#M60253</guid>
      <dc:creator>VladimirN</dc:creator>
      <dc:date>2015-10-22T09:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153200#M60254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have set the problem up correctly, and it works as it should.&amp;nbsp; You have&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/93472_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Now you can solve the beam deflections for any load and position&amp;nbsp; sol1 :=w3(a1,F1),&amp;nbsp; sol2:=w3(a2,F2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to solve for the load and position that give you a specific deflection and slope at wherever this position is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure that's a solvable problem.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 11:27:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153200#M60254</guid>
      <dc:creator>Fred_Kohlhepp</dc:creator>
      <dc:date>2015-10-22T11:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153201#M60255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way of doing it would be like the following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="477" src="https://community.ptc.com/legacyfs/online/93496_pastedImage_0.png" style="width: 399.393px; height: 477px;" width="399" /&gt;&lt;/P&gt;&lt;P&gt;You may want to compare accuracy against the values you had found:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" height="52" src="https://community.ptc.com/legacyfs/online/93500_pastedImage_1.png" style="width: 300px; height: 51.8868px;" width="300" /&gt;&lt;/P&gt;&lt;P&gt;At first sight it looks like you can find an a-value for any given F.2-value within a given range and vice versa (I have chosen the values you found in the following examples)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" height="304" src="https://community.ptc.com/legacyfs/online/93502_pastedImage_2.png" style="width: 546px; height: 304.16px;" width="546" /&gt;&lt;/P&gt;&lt;P&gt;but as soon as you lower the value of CTOL, no solutions are found&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-4" height="211" src="https://community.ptc.com/legacyfs/online/93503_pastedImage_3.png" style="width: 503px; height: 210.935px;" width="503" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Werner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Instead of "find" you could use "minerr" (especially when you think that there is no perfect exact solution and so it will find a solution with lower values of CTOL, too) but your choice of using "minimize" was wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 14:12:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153201#M60255</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2015-10-22T14:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153202#M60256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;VladimirN. wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi Stephan,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For the future - don't forget to save your worksheet in PDF or XPS file formats for preview (and its contents).&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the future - don't forget to save your worksheet in png formats for&amp;nbsp; direct view on screen without downloading files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 14:18:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153202#M60256</guid>
      <dc:creator>ValeryOchkov</dc:creator>
      <dc:date>2015-10-22T14:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: ode with unknown initial conditions</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153203#M60257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much to everyone, you helped me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also used the find-function, but I did not define the functions S and S1. I directly used the function w3 and its derivation in the solve-block. Then there was always a mistake. Doesn't matter, now I know how to do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 15:03:54 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/ode-with-unknown-initial-conditions/m-p/153203#M60257</guid>
      <dc:creator>sdidam</dc:creator>
      <dc:date>2015-10-22T15:03:54Z</dc:date>
    </item>
  </channel>
</rss>

