Solve the initial-value problem

  • Thread starter _N3WTON_
  • Start date
In summary, the student is trying to solve for y in terms of x by using the separation of variables technique. They get stuck at the line where they need to use the hyperbolic tangent. They find that they can solve for y using the following equation: y = 2tanh(-2x) + 3.
  • #1
_N3WTON_
351
3

Homework Statement


[itex] \frac{dy}{dx} = y^2 - 4 [/itex]
[itex] y(0) = -6 [/itex]


Homework Equations


The idea behind this problem is to use the separation of variables technique for solving differential equations.


The Attempt at a Solution


I have separated the equation to get:
[itex] \int{\frac{dy}{y^2 -4}} = \int 1\, dx [/itex]
Now I will have to not use latex because I do not know how to enter inverse hyperbolic functions in latex, but my integrals work out to:
atanh(y/2) = -2x+C
y/2 = tanh(2x+C)
y = 2tanh(2x+C)
Now I am unsure how to solve for C using the initial value, my ability to solve inverse hyperbolic functions is severely lacking lol
Edit: If somebody knows how to enter hyperbolic/inverse hyperbolic functions on Latex please let me know so that I can make my equations more reader friendly
 
Last edited:
Physics news on Phys.org
  • #2
Use \tanh for the hyperbolic tangent, don't know about the arc hyperbolic tangent since \arctanh doesn't do it.

Anyway, if you are uncomfortable with the hyperbolics, just use partial fractions on the y integral and work it directly with logarithms.

[Edit, added:] At the line where you have ##\textrm{arctanh}(\frac y 2) =-2x+C## you can put ##x=0,~y=6## giving ##\textrm{arctanh}(\frac 6 2) =-2\cdot 0+C## which gives ##C=
\textrm{arctanh}(3)##. Also I believe you dropped a minus sign after that.
 
Last edited:
  • #3
LCKurtz said:
Use \tanh for the arctangent, don't know about the arc hyperbolic tangent since \arctanh doesn't do it.

Anyway, if you are uncomfortable with the hyperbolics, just use partial fractions on the y integral and work it directly with logarithms.
thanks, I was thinking I could possibly convert the hyperbolic tangent into e terms in order to solve for C
 
  • #4
_N3WTON_ said:
thanks, I was thinking I could possibly convert the hyperbolic tangent into e terms in order to solve for C

Note that while you were typing this, I edited post #2 to show how to calculate C directly.
 
  • #5
LCKurtz said:
Use \tanh for the hyperbolic tangent, don't know about the arc hyperbolic tangent since \arctanh doesn't do it.

Anyway, if you are uncomfortable with the hyperbolics, just use partial fractions on the y integral and work it directly with logarithms.

[Edit, added:] At the line where you have ##\textrm{arctanh}(\frac y 2) =-2x+C## you can put ##x=0,~y=6## giving ##\textrm{arctanh}(\frac 6 2) =-2\cdot 0+C## which gives ##C=
\textrm{arctanh}(3)##. Also I believe you dropped a minus sign after that.
thank you, so for my final equation I ended up with:
[itex] y = tanh(-2x + arctanh(3)) [/itex]
I am wondering if I can possibly simplify this by writing:
[itex] y = tanh(-2x) + 3 [/itex]
or is that not correct?
 
  • #6
Did you drop a ##2##? And no, you don't get to make up formulas for tanh(a+b).
 
  • Like
Likes 1 person
  • #7
LCKurtz said:
Did you drop a ##2##? And no, you don't get to make up formulas for tanh(a+b).
you're right i did, sorry so it should be:
[itex] y = 2tanh(-2x + arctanh(3)) [/itex]
 
Back
Top