473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

solving differential equation

Hi there,

I've been trying to solve this different via numerical methods(C
programming) and it's
driving me crazy....

I can't post my code because it's simply one big mess and doesn't work.

d^2y/dx^2 - 1/(L^2)*y .... where L is just some arbitrary number......L =
0.2045....

I cannot figure this out, I was thinking matlab might be easier but I really
want to learn to do this via the C language. I just want to solve for
values of Y, and plot them against x.

Any help is appreciated,

gs


Nov 13 '05 #1
3 7998
greg.smith <pg*****@hotmail.com> wrote:
I've been trying to solve this different via numerical methods(C
programming) and it's driving me crazy.... I can't post my code because it's simply one big mess and doesn't work. d^2y/dx^2 - 1/(L^2)*y .... where L is just some arbitrary number......L =
0.2045....
That's not an equation, just a sum of two terms (or do you mean that's
the left hand side and the other side is 0), and your also not telling
about the boundary conditions or initial values for y and y' which you
will need for a numerical solution.
I cannot figure this out, I was thinking matlab might be easier but I really
want to learn to do this via the C language. I just want to solve for
values of Y, and plot them against x.


You don't show any code and you don't tell what method you try to use
(there are quite a number of methods of varying quality) so what kind
of help are you expecting? Have you been looking at "Numerical Recipes
in C" by Press et al.? While the code in the book is quite horrible,
chapter 16 and 17 give a useful introduction to numerically solving DEs
(and more information than you can expect from Usenet postings). You
can download the chapters from e.g.

http://www.library.cornell.edu/nr/bookcpdf.html.

Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Je***********@physik.fu-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring
Nov 13 '05 #2
greg.smith wrote:
Hi there,

I've been trying to solve this different via numerical methods(C
programming) and it's
driving me crazy....

I can't post my code because it's simply one big mess and doesn't work.

d^2y/dx^2 - 1/(L^2)*y .... where L is just some arbitrary number......L =
0.2045....

I cannot figure this out, I was thinking matlab might be easier but I really
want to learn to do this via the C language. I just want to solve for
values of Y, and plot them against x.

Any help is appreciated,


Using D to stand for the second derivative of y with respect ot x,
whether the form is

D = 1/(L*L*y)
or
D = y/(L*L)

the answer is trivial as a closed form exercise. When you can do something
trivially in closed form, it is an *error* to use numerical methods.

--
Martin Ambuhl

Nov 13 '05 #3
>Subject: solving differential equation
From: "greg.smith" pg*****@hotmail.com
Date: 9/21/03 6:58 PM Hawaiian Standard Time
Message-id: <bp*******************@read1.cgocable.net>

Hi there,

I've been trying to solve this different via numerical methods(C
programming) and it's
driving me crazy....

I can't post my code because it's simply one big mess and doesn't work.

d^2y/dx^2 - 1/(L^2)*y .... where L is just some arbitrary number......L =
0.2045....

I cannot figure this out, I was thinking matlab might be easier but I really
want to learn to do this via the C language. I just want to solve for
values of Y, and plot them against x.


Well you should be able to get the solution to that one with just pencil and
paper.
Stuart
Dr. Stuart A. Weinstein
Ewa Beach Institute of Tectonics
"To err is human, but to really foul things up
requires a creationist"
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tim groulx | last post by:
I have recently started receiving failures on a differential backup that previously succeeded. Nothing has changed with the structure of the db. Here is the message, any ideas are welcomed. Thanks....
1
by: Burt | last post by:
My company needs to move a 30 Gig SQL Server across the country as soon as possble on July 1. Turns out moving the full db across the network takes a few hours. I'd like to move a full copy of...
7
by: 116Rohan | last post by:
I have been trying to figure out how to solve uneqaulity problems I have two equations which I am trying to figure out What values of n will make 8n^2 < 64 * n * Lg n What I am trying to find...
9
by: TG | last post by:
Hi there. Anyone knows how to use numpy / scipy in order to solve this ? * A is an array of shape (n,) * X is a positive float number * B is an array of shape (n,) * O is an array of shape...
6
by: mismis | last post by:
HELP!..PLEASE..i have a project that asks to write a C++ program solving for the root of the equation (x*x*x)-(x*x)-(9x)+(9) ........huhuhu..please help..i really need to pass..please..
5
by: Deviate | last post by:
Hi again guys :) Ok i have this problem, i need to solve the equation phi(x) = 0.1 (where phi is the area under the gaussian normal distribution function) apparently im supposed to solve it...
1
by: guhu | last post by:
how to solve a second order differential equation with respect to time using c language.
4
by: sdufoo | last post by:
Hallo guys, I have to solve a system of Differential equations: http://picasaweb.google.de/sdufoo/EcuacionesDiferenciales02/photo#5228386949051570594 these are the equations of an induction...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.