How to solve a set of transcendental differential equation?

I have to solve a couple of transcendental differential equation. Can anyone please suggest me how should I write a code for solving these equations: -
The intensity at a depth z is: -
I(z) = I₀ e^(-∫_0^1[f(z,t) A_undam + {1-f(z,t)A_dam}]dz)……………………………………(1) (The lower limit of this integration is 0 and the upper limit is 1.)
and the rate equation: - df(z,t) = -α I (z) f(z,t) dt + β N {1 - f(z, t)} dt ………………………….(2)
I have the data for α, β, Iₒ, A_undam and A_dam. I need to get f(z,t). How do I solve these two transcendental equations? Here, α, β, Iₒ are just a number like 10.34 etc, A_undam and A_dam are both column vector. Using equation (1) and (2), I need to solve for f(z,t). How should I do it?

 Accepted Answer

Are I(z) and f(z,t) intended to be something other than scalars? You say that A_undam and A_dam are column vectors, so if f(z,t) is a scalar then f(z,t)*A_dam would be a column vector and would not be subtractable from 1 because 1 is not a column vector. To make geometric sense with A_undam and A_dam being column vectors, f(z,t) would have to be a row vector so that f(z,t)*A_dam would be a scalar. But then in the rate equation, 1 - f(z,t) would not make geometric sense.
I have to conclude that the situation cannot be as you describe it, unless "column vector" includes the degenerate case of 1 x 1 column vector.

3 Comments

Hi Roberson, Thank you for the comments. 1 is a scalar. So, f(z) which is also a scalar can be subtracted from 1. The resulting subtraction will be a scalar and that scalar multiplied by A_dam will be a vector quantity. With this, both the intensity equation and the rate equation will make sense. I am not good at programming. Do you have any idea about how should I start writing code for solving these two coupled transcendental equations? I will be thankful to you for your suggestion.
Your equation says
{1-f(z,t)A_dam}
not
{1-f(z,t)}A_dam
which would be required to match what you describe here.
If that expression comes out as a vector quantity then you have exp() of a vector. Do you intend that to be exp() of each entry in the vector individually, or do you intend it to matrix exponential ?
Either way you are going to end up with the scalar Io multiplied by a non-scalar quantity, which means that I(z) would have to be non-scalar. But that forces f(z,t) to be non-scalar, in contradiction to your description here.
Hi Walter Roberson, Thank you for pointing out the typo. This is a typo It should be {1 - f(z,t)}A_dam My mistake. I'll edit right now. The exponential has to be a vector quantity.

Sign in to comment.

More Answers (2)

I have to solve a couple of transcendental differential equation. Can anyone please suggest me how should I write a code for solving these equations: -
The intensity at a depth z is: -
I(z) = I₀ e^(-∫_0^1[f(z,t) A_undam + {1-f(z,t)} A_dam]dz)……………………………………(1) (The lower limit of this integration is 0 and the upper limit is 1.)
and the rate equation: - df(z,t) = -α I (z) f(z, t) dt + β N {1 - f(z, t)} dt ………………………….(2)
I have the data for N, α, β, Iₒ, A_undam and A_dam. I need to get f(z,t). How do I solve these two transcendental equations? Here, α, β, Iₒ are just a number like 10.34 etc, N is an integer like 10^20 etc, A_undam and A_dam are both column vector. Using equation (1) and (2), I need to solve for f(z,t). How should I do it?

2 Comments

You are going to end up with the scalar Io multiplied by a non-scalar quantity, which means that I(z) would have to be non-scalar. But that forces f(z,t) to be non-scalar, in contradiction to your description that f(z) is a scalar.
If f(z,t) is a scalar and not a 2 dimensional array, then I suggest you expand your expression
[f(z,t) A_undam + {1-f(z,t)} A_dam] * dz
becomes
(f(z,t) * A_undam + A_dam - f(z,t) * A_dam) * dz
which becomes
(f(z,t) * (A_undam - A_dam) + A_dam) * dz
then use a fundamental properties of integrals, that when C is a constant, integral(f(x) + C, x = a to b) = integral(f(x), x = a to b) + (b-a) * C. The integral in this case is over 0 to 1, so (1-0) * A_dam becomes the contribution from the +A_dam in the integral.
A_dam + integral(f(z,t) * (A_undam - A_dam) * dz, z = 0 to 1
Then use the property that integral(C * f(x)) = C * integral(f(x)) to transform to
A_dam + integral(f(z,t) * dz) * (A_undam - A_dam)
which will be easier to work with (having only one integral).
However, your integral is over z, so z is effectively "bound" into the integral as a dummy variable, unrelated to the "z" of I(z). And "t" does not appear as a variable of integration, but the equation is not I(t). So you have a problem.

Sign in to comment.

Hi Roberson, Thank you again for the comments. I'll definitely check it and will be back to you. It may be another typo again. So, if it were I(t) instead of I(z) as you have told, then how do you write matlab code for solving those equations? If you have any idea of solving those transcendental equations, then please let me know. Please feel free to correct the typos and errors you think should be eliminated. Thank you.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!