Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
question on how to integrate an equation

Subject: question on how to integrate an equation

From: Peter Schreiber

Date: 18 May, 2011 20:38:04

Message: 1 of 3

Hello,
I was wondering if someone has any ideas how to integrate the following equation in matlab. The differential equation that I derived that describes a reflector is as follows:

(x- C - sqrt( (x-C)^2 + y^2 ) * dx + y * dy = 0

where C is a constant. The goal would be to have an implicit
equation that only contains C, x, and y. All quantities are real.

I would be grateful for any comments.

thanks,

Peter

Subject: question on how to integrate an equation

From: Nasser M. Abbasi

Date: 18 May, 2011 21:20:27

Message: 2 of 3

On 5/18/2011 1:38 PM, Peter Schreiber wrote:
> Hello,
> I was wondering if someone has any ideas how to integrate the following equation
> in matlab. The differential equation that I derived that describes a reflector is as follows:
>
> (x- C - sqrt( (x-C)^2 + y^2 ) * dx + y * dy = 0
>
> where C is a constant. The goal would be to have an implicit
> equation that only contains C, x, and y. All quantities are real.
>
> I would be grateful for any comments.
>
> thanks,
>
> Peter


------------------------------
EDU>> eq = '(x- C - sqrt( (x-C)^2 + y^2 )) * Dx + y=0';
sol=dsolve(eq,'y')
EDU>> sol(1)
-----------------------------
  
  
- (exp(C7)*y^2)/4 + C + 1/exp(C7)
  
C7 is constant of integration.


--Nasser

Subject: question on how to integrate an equation

From: Roger Stafford

Date: 18 May, 2011 23:44:06

Message: 3 of 3

"Peter Schreiber" <schreiber.peter15@gmail.com> wrote in message <ir1anc$mht$1@newscl01ah.mathworks.com>...
> Hello,
> I was wondering if someone has any ideas how to integrate the following equation in matlab. The differential equation that I derived that describes a reflector is as follows:
>
> (x- C - sqrt( (x-C)^2 + y^2 ) * dx + y * dy = 0
>
> where C is a constant. The goal would be to have an implicit
> equation that only contains C, x, and y. All quantities are real.
>
> I would be grateful for any comments.
>
> thanks,
>
> Peter
- - - - - - - - -
  You can do this problem without using 'dsolve' by dividing both sides of your equation by sqrt((x-C)^2+y^2). The result can be seen to be equal to

 d( sqrt((x-C)^2+y^2)-(x-C) ) = 0

which means that sqrt((x-C)^2+y^2)-(x-C) must be a constant. These would be a family of parabolas with vertical directrices.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us