Simple integral

  • Thread starter Karol
  • Start date
  • #1
1,380
22

Homework Statement


181.png
why do i need the information that y>0?

Homework Equations


$$\frac{dy}{dx}=f(x)~\rightarrow~dy=f(x)dx~\rightarrow~y=\int f(x)dx$$

The Attempt at a Solution


$$\frac{dy}{dx}=\frac{x}{y}~\rightarrow~\int y~dy=\int x~dx~\rightarrow~y^2=x^2~\rightarrow~y=x$$
I square root y2 and if y<0 it works also
 

Answers and Replies

  • #2
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
37,189
7,290
A couple of inaccuracies.
You should allow a constant of integration since you are not given any initial condition.
When taking the square root you must allow for opposite signs.
If your answer allows y>0 then your answer is wrong. You need to write it such that y is > 0. (Merely adding the text "y>0" would do, but maybe there's something better.)
 
  • #3
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
770
To add to haruspex's remarks, when you add the constant of integration and show your steps, I think it will be apparent where you use the ##y>0## information.
 
  • #4
1,380
22
With y>0:
$$\frac{dy}{dx}=\frac{x}{y}~\rightarrow~y^2=x^2+C$$
$$\left\{ \begin{array}{lr} \mbox{for}~x>0 & y=x \\ \mbox{for}~x<0 & y=-x \end{array}\right.$$
 
  • #5
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
770
With y>0:
$$\frac{dy}{dx}=\frac{x}{y}~\rightarrow~y^2=x^2+C$$
$$\left\{ \begin{array}{lr} \mbox{for}~x>0 & y=x \\ \mbox{for}~x<0 & y=-x \end{array}\right.$$
Technically, without skipping steps you have$$
\frac {y^2} 2 = \frac {x^2} 2 + C$$And you are ignoring the ##C## in your answer.
 
  • #6
1,380
22
Yes, right, i omitted the division by 2 for shortening. after it comes ##~y^2=x^2+C## and the rest, right?
The condition y>0 must have been imposed since without it ##~y=\pm x## and this isn't a function since every x has 2 y's. am i right?
 
  • #7
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
770
I figured you were using a shortcut, but still you have to solve ##y^2 = x^2 + C## for ##y##.
 
  • #8
1,380
22
$$y^2=x^2+C~\rightarrow~y=\pm \sqrt{x^2+C}$$
This isn't a function since each x has two y's, so, with the help of y>0:
$$y=+\sqrt{x^2+C}~\rightarrow~y=\pm (x+C)$$
Snap1.jpg
 
  • #9
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,722
$$y^2=x^2+C~\rightarrow~y=\pm \sqrt{x^2+C}$$
This isn't a function since each x has two y's, so, with the help of y>0:
$$y=+\sqrt{x^2+C}~\rightarrow~y=\pm (x+C)$$
View attachment 112302

If ##C > 0## the functions ##y = \sqrt{x^2+C}## and ##y = + (x+C)## or ##y = -(x+C)## are different; their graphs do not even look the same. One of them is differentiable everywhere, while the other two are not.
 
  • #10
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
37,189
7,290
$$y=+\sqrt{x^2+C}~\rightarrow~y=\pm (x+C)$$
Think that through again.
 
  • #11
1,380
22
$$y=+\sqrt{x^2+C}$$
Snap1.jpg
This is the final answer, i can't simplify further
 
  • #13
1,380
22
Thank you LCKurtz, Ray Vickson and Haruspex
 

Related Threads on Simple integral

  • Last Post
Replies
7
Views
941
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
1
Views
853
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
841
  • Last Post
Replies
10
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
824
  • Last Post
Replies
7
Views
1K
  • Last Post
Replies
1
Views
1K
Top