How to solve this equations? Explicit or implicit?

In summary, You are trying to solve an equation involving velocity and a material property. You have two equations, one involving differentiation and the other involving integration. The first equation states that y/x (dx/dt) = y, and the second equation states that v/x = C. You need to solve for y(xn+1-xn) in order to solve for the original equation.
  • #1
hoomanya
90
0
Hi,

I am trying to write a code for an equation which looks like this:
[itex]\frac{\partial{y}}{\partial{t}}[/itex]=f(x,y,t) -y(x[itex]^{n+1}[/itex]-x[itex]^{n}[/itex])

where n is the time step number. I have no idea how I can go on about solving (approximating the solution) to this problem. Any hints would be appreciated.

Thank you in advance!
 
Physics news on Phys.org
  • #2
That doesn't look quite right to me. You have dy/dt on the left, and you also have it on the right (as a finite difference approximation). Could you give us the original DE you're trying to solve?

In response to the question in your subject, implicit methods are usually more stable than implicit. A lot depends on the nature of f.
 
  • #3
This is the equation I have:

dy/dt = f(x,y,t) - (y/x) (dx/dt)

I am guessing that a way to solve this would be to leave dx/dt as it is to being with. So say for example if I was going to solve it explictily:

y[itex]^{n+1}[/itex] =h[ f(x,y,t)[itex]^{n}[/itex] - (y/x)[itex]^{n}[/itex](dx/dt)[itex]^{n}[/itex]] +y[itex]^{n}[/itex]

But then I am not sure what to do with the dx/dt ?

Thanks!
 
  • #4
hoomanya said:
This is the equation I have:

dy/dt = f(x,y,t) - (y/x) (dx/dt)
Ah, I see. You have two functions of time x(t) and y(t). What confused me was that you wrote y(xn+1-xn), which looked to me like y evaluated at xn+1-xn, not a multiplication.

What happen to the 1/x factor? Your DE says (y/x)(dx/dt), but the FDE in your first post lost the 1/x.

Is there a reason why you have an h in this new FDE, but not in the original one?

I am guessing that a way to solve this would be to leave dx/dt as it is to being with. So say for example if I was going to solve it explictily:

y[itex]^{n+1}[/itex] =h[ f(x,y,t)[itex]^{n}[/itex] - (y/x)[itex]^{n}[/itex](dx/dt)[itex]^{n}[/itex]] +y[itex]^{n}[/itex]

But then I am not sure what to do with the dx/dt ?

Thanks!
You can't solve this as stated. It is incomplete. You need another equation. You have two functions of time, x, and y, and only one equation.

If I misunderstand this, please clarify.
 
  • #5
Hi,

There is definitely a 1/x in the equation. So the 2nd equation is correct.

The h is the time step and I'm sorry it should not be there.

I think you're right anyway. I might have the other equation so I think I will continue the thread again once I've sorted that out and I would appreciate you reply then.

Thanks very much.
 
  • #6
Hi again,

I have changed my equations a bit and have an extra equation but not sure if that would help at all. So my equations are:

[itex]\partial[/itex](yv)/[itex]\partial[/itex]t=f(y,v,t)
where v is velocity = dx/dt, and y is a material property.

In addition:
[itex]\partial[/itex]v/[itex]\partial[/itex]x = constant

I hope this is a bit better...

Is it possible to solve these?

Many Thanks!
 
  • #7
hoomanya said:
[itex]\partial[/itex](yv)/[itex]\partial[/itex]t=f(y,v,t)
where v is velocity = dx/dt, and y is a material property.

In addition:
[itex]\partial[/itex]v/[itex]\partial[/itex]x = constant
So, let me make sure I understand this. In your first equation, you're differentiating the product of y and v with respect to time:

[tex]
\begin{eqnarray*}
f(y,v,t) & = & \frac{\partial yv}{\partial t} \\
& = & y\frac{\partial v}{\partial t}+v\frac{\partial y}{\partial t} \\
& = & y\frac{\partial^2 x}{\partial t^2}+\frac{\partial x}{\partial t}\frac{\partial y}{\partial t} \\
\end{eqnarray*}
[/tex]

and your second equation is

[tex]
\frac{\partial v}{\partial x} = C
[/tex]

I'm having some trouble understanding that second equation. It's not clear to me how we regard v as a function of x so as to take the derivative. But here's my attempt. I'm picturing this as a particle moving in the +x direction under the influence of some sort of force. Let's assume it starts off at x=0, and that it has velocity v0. (It has to have some velocity to start with, or it'll never move away from its starting point.) Then it's going to move in the positive direction with increasing velocity, the velocity at time t always equal to v0 + C x(t). to get from x to x(t)+dx will take time [itex]dt=\frac{dx}{v_0+C x(t)}[/itex], giving the following DE for x(t):

[tex]
\frac{dx}{dt}=v_0+C x(t)
[/tex]

with initial condition x(0) = 0.

This has solution

[tex]
\begin{eqnarray*}
x(t) & = & \frac{v_0}{C}\left(e^{Ct}-1\right) \\
v(t) & = & v_0 e^{Ct}
\end{eqnarray*}
[/tex]

I'll pause there to ask if this looks right. Also, could you explain what the Hell this is? It would really help to have an idea where the equations come from.
 
Last edited:
  • #8
Thanks. I'm sorry if I'm not being clear enough. Here's another attempt to clarify.

v is mesh velocity and in the second equation when I said ∂v/∂x = constant, I meant ∂v/∂h = constant, where h could be thought of as an element length in finite element analysis. I'm not sure if that would make a difference now.

y is a material property, in this case could be density. and I am trying to solve for y and v at each time step.

Thank you very much.
 
  • #9
I think you need to explain more thoroughly. Here are some questions:

(1) What is "mesh velocity"? Is this a fluid flow problem?

(2) You said before that v is dx/dt. How is that consistent with its being mesh velocity?

(3) What is x?

(4) Why is x a function of time?

(5) "∂v/∂h = constant" means that if you change h by a certain amount, v changes by a constant times that amount. Why does v depend on your mesh size?

(6) Why do you have a mesh, and why do you talk of finite element analysis, when you're solving an ODE?

(7) You said before that y is s function of time. Why is it that, at a given time, y is just a single number? Is it constant everywhere in your material?

The reason I ask all these question is that I think you have set the problem up wrong in a fundamental way. I suspect you actually want a partial differential equation.

Could you describe the problem? I mean REALLY describe the problem, not just give a few confusing little hints. What's the material? What's the property? What is x? What is v? Why does x change in time? Why does y change in time? Is there a relationship between x and y? If so, what is it?
 
  • #10
I am trying to use the ALE method in an analysis. The reason I have not explained everything here is because I need help with the mathematics of the equation , which is also the reason why I have posted the question in the general math section and tried to simplify the equations...
I think I will post the equation in a different forum or section now that I know I won't get anywhere with just the maths ... Thanks for your help anyways.
 

1. What is the difference between explicit and implicit equations?

Explicit equations have all the variables clearly defined and can be solved for a specific variable. Implicit equations, on the other hand, do not have all the variables explicitly stated and may require additional algebraic steps to solve.

2. How do I know if an equation is explicit or implicit?

An equation is explicit if all the variables are clearly defined and can be solved for a specific variable. If there are variables on both sides of the equation and no clear way to isolate one variable, it is likely an implicit equation.

3. Which type of equation is easier to solve, explicit or implicit?

In general, explicit equations are easier to solve because all the variables are explicitly stated and can be isolated and solved for. Implicit equations may require additional algebraic steps to solve and can be more challenging.

4. Can an explicit equation be rewritten as an implicit equation?

Yes, an explicit equation can be rewritten as an implicit equation by rearranging the terms and variables. However, it may not always be necessary or beneficial to do so.

5. Are there certain situations where it is better to use an implicit equation instead of an explicit one?

Implicit equations are often used in situations where there are multiple variables and it is not necessary to solve for a specific variable, such as in systems of equations or in differential equations. In these cases, implicit equations may provide a more comprehensive understanding of the relationships between variables.

Similar threads

  • Differential Equations
Replies
16
Views
894
  • Differential Equations
Replies
1
Views
752
Replies
5
Views
1K
  • Differential Equations
Replies
6
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
4
Views
638
Replies
1
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
666
Back
Top