Struggling with This Differential Equation?

  • Context: Undergrad 
  • Thread starter Thread starter marcoaaguiar
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around solving a differential equation related to control engineering. Participants are exploring various methods to find an analytic solution to the equation, which is part of a larger problem involving system dynamics and controller properties. The conversation includes attempts at substitutions, numerical solutions, and the implications of initial conditions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in solving the differential equation and seeks assistance, noting their background in engineering and a lack of recent experience with differential equations.
  • Another participant suggests that the properties the original poster hopes to prove may be established without solving the equation directly.
  • A participant provides a reformulation of the differential equation and attempts to derive a relationship between the variables I and g, while noting the singularity when g equals zero.
  • One contributor proposes a numerical solution using Mathematica, detailing the setup of the equations and initial conditions, and shares results that indicate a close approximation between sides of the equation.
  • Another participant suggests solving the system of equations simultaneously, providing a Mathematica code snippet and discussing the results of their numerical solution.

Areas of Agreement / Disagreement

There is no clear consensus among participants. While some propose numerical methods and reformulations, others question the necessity of solving the equation directly. The discussion remains open with multiple approaches being explored.

Contextual Notes

Participants mention specific initial conditions and constants, but there are unresolved assumptions regarding the behavior of the functions involved and the implications of singular points in the differential equation.

marcoaaguiar
Messages
2
Reaction score
0
Hi, I've been two weeks trying to solve this Diff Equation, but no success 'til now. I found your forum now, and I hope we can find a solution. I'm sorry if I'm posting this on the wrong section.
This problem looks simple, but due my formation (Engineering) and the fact that I've not used EDO for a while, makes this problem hard for me :)

It's a piece of a Control Engineering problem for a paper that I'm writing.
The equation is:

dy = (k + x)*(a/x+b/y)dx

The inital condition for y is a constant 'y0' and for x = 0. I need a analytic so I can prove some some properties of my controller.

I'll really appreciate your help
 
Physics news on Phys.org
I tried a few substitutions and I also tried maple and all came up a blank, what properties were you hoping to prove? They may well be proven without actually solving the equation.
 
ok, the full problem is:

the controller diff equation
dI/V = a*dg/g + b*dp/p

System dinamics:
System 1:
dV = dg
but the inital conditions for V is different from 0, a cst k
so V = (k + g)

System 2:
dg = I*dp/p
dp/p = dg/I

back to the controller DE,

dI/(k+g) = a*dg/g + b*dg/I
>> dI = (k+g)*(a/g + b/I)*dg

or

dI = (k+g)*(a*I+ b*g)/(g*I)*dg
>> g*I dI = (k+g)*(a*I + b*g) dg

I want to find I(t), so i can find g(t). Based in the input p(t).
 
Lemme' give it a shot in terms of I, g, and known p(t). You have:

[tex]\frac{I'}{k+g}=\frac{a g'}{g}+\frac{b g'}{I}[/tex]

So that's a DE for the function I(g). Right? Not 100% sure but think so. Suppose for now, I'm ok with that. Then note g can't be zero since that's a singular point of the DE. So let's solve this in Mathematica numerically for the function I(g) (can't use big I in Mathematica as a variable name) with just all the constants set to one:

Code:
myk = 1;
a = 1;
b = 1;
g0 = 1;
i0 = 1;
myp[t_] := 2 + t^2;

mysol = NDSolve[{g i[g] i'[g] == (myk + g) (a i[g] + b g), 
   i[g0] == i0}, i, {g, g0, 15}]
myi[g_] := Evaluate[i[g] /. mysol] // First

So now I have I(g) and I solve the other equation in g:

[tex]dg=\frac{Ip'}{p}[/tex]

and for now, just let p(t)=2+t^2 and keep in mind I is a function of g. So I solve for g in Mathematica now letting g(0)=1:

Code:
mygsol = NDSolve[{Derivative[1][g][t]/myi[g[t]] == (2*t)/(2 + t^2), g[0] == 1},
 g, {t, 0, 2}]
myg[t_] := First[Evaluate[g[t] /. mygsol]]

Note how I specified i(g(t)) in that expression since previously I solved for i(g). So now I have g(t).

Now, let's back-substitute all that into the original DE an keep in mind that I solved for I(g) so to back-substitute into the DE in terms of t, I calculated:

[tex]\frac{dI}{dt}=\frac{dI}{dg}\frac{dg}{dt}[/tex]

Code:
In[149]:=
leftside = ((D[myi[g], g] /. g -> myg[1])*(D[myg[t], t] /. t -> 1))/(1 + myg[1])
rightside = (a*D[myg[x], x] /. x -> 1)/myg[1] + (b*D[myg[x], x] /. x -> 1)/myi[myg[1]]

Out[149]=
1.8982003067079452

Out[150]=
1.8981978130717898

That's a start since the left side is close to the right side. That may however not be what you want and I'm not sure everything is ok. May need to clean it up if it's close to what you want.
 
Last edited:
I didn't initially think to just solve the system simultaneously:

In[118]:=
a = 1;
b = 1;
k = 1;
i0 = 1;
g0 = 1;
p[t_] := 2 + t^2;
ttest = 2.3;

mysol = NDSolve[{Derivative[1][t] == (k + g[t])*((a*Derivative[1][g][t])/g[t] + (b*Derivative[1][g][t])/i[t]),
Derivative[1][g][t] == (i[t]/p[t])*Derivative[1][p][t],
i[0] == i0, g[0] == g0}, {i, g}, {t, 0, 5}]

myi[t_] := Evaluate[i[t] /. Flatten[mysol]];
myg[t_] := Evaluate[g[t] /. Flatten[mysol]];

leftside = D[myi[t], t] /. t -> ttest
rightside = (k + myg[ttest])*((a*D[myg[t], t] /. t -> ttest)/myg[ttest] + (b*D[myg[t], t] /. t -> ttest)/myi[ttest])

Out[125]=
{{i -> InterpolatingFunction[], g -> InterpolatingFunction[]}}

Out[128]=
19.888332975980877

Out[129]=
19.88832995172911


. . . glad I'm not being tested on this stuff.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 16 ·
Replies
16
Views
4K
Replies
1
Views
1K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 2 ·
Replies
2
Views
3K