Separable ODE, should I take the log of both sides?

So, y(x) = ln(exp(x) + 1).In summary, the equation dy/dx = exp(x-y) can be solved by taking the log of both sides and rearranging to get an equation in the form of y = ln(exp(x) + 1). This solution is obtained by using the initial condition y = ln 2 at x = 0 and solving for the constant C.
  • #1
JFonseka
117
0

Homework Statement


Solve dy/dx = exp(x-y) given that y = ln 2 at x = 0

Homework Equations


None.

The Attempt at a Solution



Firstly let's get the equation into a form so we can re-arrange the x's and y's, and then re-arrange.

dy/dx = exp(x)/exp(y)

exp(y)*dy = exp(x)*dx

Integrate:

exp(y) = exp(x) + C

Substitute:

exp(ln(2)) = exp(0) + C

2 = 1 + C, therefore C = 1

Hence, exp(y) = exp(x) + 1, and take log to get an equation in the form of y = ...

ln(exp(y)) = ln(exp(x)) + ln(1) =>

y = x

Doesn't really look right though, am I right or wrong?

Edit: Solved-> ln(exp(y)) = ln(exp(x) + 1)
=> y(x) = ln(exp(x) + 1)
 
Last edited:
Physics news on Phys.org
  • #2
Looked OK until the last step when you took the logs. log(a+b) isn't equal to log(a)+log(b).

Note also that the initial condition no longer holds if y=x was the solution.
 
  • #3
I solved the problem using Maple; it gives the answer as y = ln(exp x + 1).

So I guess I'm meant to take the log of the entire expression on the r.h.s.
 

Related to Separable ODE, should I take the log of both sides?

1. What is the purpose of taking the log of both sides in a separable ODE?

Taking the log of both sides in a separable ODE allows us to convert the equation into a form where the variables can be separated and solved individually. This simplifies the equation and makes it easier to solve.

2. When should I consider taking the log of both sides in a separable ODE?

You should consider taking the log of both sides when you have an equation that is in the form of y' = f(x)g(y), where f(x) and g(y) are some functions of x and y. Taking the log of both sides will help you to separate the variables and solve the equation.

3. Are there any special cases where taking the log of both sides is not necessary in a separable ODE?

Yes, there are some special cases where taking the log of both sides is not necessary in a separable ODE. For example, if you have an equation in the form of y' = f(y), where f(y) is a function of y only, you can solve the equation without taking the log of both sides.

4. What are the potential pitfalls of taking the log of both sides in a separable ODE?

One potential pitfall of taking the log of both sides in a separable ODE is that it may introduce extraneous solutions. This can happen when you take the log of a negative number, which can lead to complex solutions. It is important to check for extraneous solutions when solving equations with logarithms.

5. Can taking the log of both sides be used in any type of differential equation?

No, taking the log of both sides can only be used in certain types of differential equations, specifically separable differential equations. This method will not be helpful in solving other types of differential equations, such as linear or exact differential equations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
932
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
867
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
388
  • Calculus and Beyond Homework Help
Replies
8
Views
792
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
Back
Top